English > Scripts and Templates

AllMovie+ script: Including data for custom fields

<< < (7/10) > >>

rick.ca:

--- Quote ---I have tried to paste the rating part of the original script into yours to no success.
--- End quote ---

I don't know why not. It looks like the essential difference is just using...

AddFieldValue(mfRating, FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));

instead of...

AddCustomFieldValueByName('AllMovie rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));

If you start the program with the -debug switch, the log will show any script errors.

deazo:

 This works great thank you  :D

Hyomil:
I've started importing the Allmovie reviews into a custom memo field, but there are no paragraph breaks like there are with the user reviews for the IMDb plugin.  I checked 2 reviews

http://www.allmovie.com/work/twilight-420151/review
http://www.allmovie.com/work/obsessed-433716/review

and both have multiple paragraphs on the website but are one long paragraph when imported into the memo field.  Any idea why this could be happening?

rick.ca:
I don't know. It's always been that way, and I'm sure the original script is the same.

According to the Scripting Manual, the doLineBreaks parameter of the TextBetween function is to be "set to true if you want the <br> tag to be replaced with carriage return character." It is, but it doesn't seem to work. I don't understand these things, but I wonder if it's because this is XHTML and only the closing form of the tag—<br />—is used. In any case, the tags are not being converted, and the result of the function is to "return the resulting substring without tags"—so they just get stripped.

I would need nostra to fix the function, or suggest a workaround. I suppose it could be handled using different functions, but I'm unable figure it out. :'(

Hyomil:
Hmm, since the IMDb plugin is a DLL and not a script, I presume there's no way to examine it to see how nostra did it for the IMDb user reviews.  Have you noticed if any of the other Movie Information scripts are able to do the conversion successfully?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version