English > Scripts and Templates

AllRovi movie script

<< < (19/26) > >>

rick.ca:
Ab Normal Beauty suggests a rare situation where there are Characteristics, but nothing at all after them on the tab. The following change will fix that. Hopefully, it will work for everything else too.  :-\


--- Code: ---//Characteristics 
 //modified by rick.ca 07/29/2011 for records with nothing after 'Characteristics'
 TmpStr := HTMLValues(HTML,
'<h3>characteristics</h3>', '<!--[if !IE 7]><!-->', //ItemEnd was '<div class="promo-frame">'
'>- ', '</div>',
', ', EndPos);
AddCustomFieldValueByName('Characteristics', TmpStr);
--- End code ---

Please try this to see if it fixes all the cases where you noticed the problem.

RazorHall:
That did the trick in the vast majority of cases, but the problem still pops up on rare occasions (Bounty Huntress 2, for example).

Ivek23:

--- Quote from: RazorHall on July 30, 2011, 02:37:35 pm ---That did the trick in the vast majority of cases, but the problem still pops up on rare occasions (Bounty Huntress 2, for example).

--- End quote ---

Try this code

--- Code: ---//Themes (Category)
 //modified by rick.ca 07/09/2011
 //modified by Ivek23 07/30/2011
 TmpStr := HTMLValues(HTML,
'data-typeOp=', '</div>',
'">', '</button>',
', ', EndPos);

if GET_THEMES then
AddFieldValue(mfCategory, TmpStr);
 AddCustomFieldValueByName('Themesr', TmpStr)

--- End code ---

This movie 10 Things I Hate About You (1999) also has a button "more" there, now that this is already correct, it would not be bad to add the option is what is hidden under the "more" button.

BTW:
It should be Synopsis move the location of the AMG ID,
--- Code: ---//AMG ID
 AddCustomFieldValueByName('AMG WID', HTMLValues(HTML,
                             '<dt>AMG ID</dt>', '</dd>',
                '<pre>', '</pre>',
                ', ', EndPos));


//Description
//modified by Ivek23 and rick.ca 07/09/2011
 curPos := PosFrom('<span>', HTML, curPos);
 endPos := PosFrom('</span>', HTML, curPos);
 TmpStr5 := TextBetween(HTML, '<span>', '</span>', True, curPos);

 curPos := PosFrom('<span>by', HTML, curPos);
 endPos := PosFrom('</span>', HTML, curPos);
 if RICK_CA then
TmpStr3 := TextBetween(HTML, '<span>by ', '</span>', True, curPos)
 else
TmpStr3 := TextBetween(HTML, '<span>', '</span>', True, curPos);

 curPos := PosFrom('<strong>', HTML, curPos);
 endPos := PosFrom('</strong>', HTML, curPos);
 TmpStr4 := TextBetween(HTML, '<strong>', '</strong>', True, curPos);

 curPos := PosFrom('<p>', HTML, curPos);
 endPos := PosFrom('</p>', HTML, curPos);
 TmpStr := Copy(HTML, curPos, EndPos - curPos);
 TmpStr1 := StringReplace(TmpStr, ' -- ', '—', True, True, False);
 TmpStr2 := StringReplace(TmpStr1, ' --- ', '—', True, True, False);
 TmpStr := StringReplace(TmpStr2, '--', '—', True, True, False);
 TmpStr1 := StringReplace(TmpStr, #13#13#13#13, #13#10#13#10, True, True, False);
 TmpStr2 := RemoveTagsEx(TmpStr1);

 if TmpStr4 = 'synopsis' then
if RICK_CA then
AddFieldValue(mfDescription, TmpStr2 + #13 + '—' + TmpStr3)
else
AddFieldValue(mfDescription, '  ~~  ' + TmpStr4 + '  ~~  ' + #13 + TmpStr2 + #13 + ' - ' + TmpStr3 )          
 else
LogMessage('No Synopsis available');

end;

--- End code ---
it will be fine, because I have done so (as well as original AllMovie script Description was at the end) and I have no problems in the functioning of the script and when the later will not more problems.

Edit: .... Description was at the end above procedure ParseSearchResults).

RazorHall:

--- Quote from: Ivek23 on July 30, 2011, 05:26:01 pm ---Try this code
--- End quote ---

Unfortunately there seems to be no change after using that code.

EDIT: Actually, I see now that it is getting more information into the Category field of some movies, so thanks for that.  :)  Still having the above issue with the Characteristics field on a select few movies, though.

Ivek23:

--- Quote ---Still having the above issue with the Characteristics field on a select few movies, though.
--- End quote ---
What are the problems then there.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version