English > Scripts and Templates
Allmovie Script
Ivek23:
I will explain the Movie Title The Matrix:
Longer way:
The first use URL:
http://www.allmovie.com/work/the-matrix-177524
to get to this page,then go to DVD Releases View,(http://www.allmovie.com/dvd/releases/the-matrix-177524)
Easier way:
Through this
--- Code: ---//Features (DVD releases)
curPos := PosFrom('<td class="large-list-title" style="padding-top: 13px; padding-bottom: 1px;">', HTML, EndPos);
TmpStr := TextBetween(HTML, '<td class="large-list-title" style="padding-top: 13px; padding-bottom: 1px;">', '>View DVD Releases</a></td>', False, curPos);
TmpStr1 := StringReplace(TmpStr, 'ยป <a href=', '', True, True, False);
If TmpStr1 <> '' then
AddFieldValue(mfFeatures, '<link url=' + TmpStr1 + '>DVD Releases</link>');
--- End code ---
I get through this
<link url="http://www.allmovie.com/dvd/releases/the-matrix-177524">DVD Releases</link>
directly to this page DVD releases for:
then choose a title such as this one Matrix (Sep 21, 1999 Warner Home Video) Feature confirm the movie title Matrix and I get to this page the url http://www.allmovie.com/dvd/matrix-4529
Copy this url in PVD to rest url and then can I get rating for DVD Rating and Feature Rating,and this
--- Code: --- //DVD Rating
AddCustomFieldValueByName('DVD rating', '0');
curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
if curPos > 0 then begin
curPos := PosFrom('alt="', HTML, curPos) + 5;
EndPos := PosFrom(' ', HTML, curPos);
AddCustomFieldValueByName('DVD rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));
end else
curPos := EndPos;
//Feature Rating
AddCustomFieldValueByName('Feature rating', '0');
curPos := PosFrom('<img src="/img/st_r', HTML, EndPos);
if curPos > 0 then begin
curPos := PosFrom('alt="', HTML, curPos) + 5;
EndPos := PosFrom(' ', HTML, curPos);
AddCustomFieldValueByName('Feature rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));
--- End code ---
when I run my on new modified AllMovie + (Ivek23) script.
rick.ca:
Adding the DVD page to the URL field will result in the script using that instead of the main movie page. So you'll get your DVD ratings, but also overwrite the movie description with the DVD description. And the script will no longer be able to update the movie information (except for some fields which are the same and in the same position on both pages).
Ivek23:
How would the script work
--- Code: --- //Aka
AddFieldValue(mfAka, TextBetween(HTML, '<span>AKA</span>', '</table>', True, curPos));
//Box office
curPos := PosFrom('<span>Box office</span>', HTML, EndPos);
if curPos > 0 then begin
curPos := PosFrom('<li>', HTML, curPos) + 5;
EndPos := PosFrom('</li>', HTML, curPos);
TmpStr := Copy(HTML, curPos, EndPos - curPos);
curPos := Pos('/', TmpStr);
if curPos > 0 then
Delete(TmpStr, curPos, Length(TmpStr) - curPos + 1);
curPos := Pos(':', TmpStr);
if curPos > 0 then
Delete(TmpStr, curPos, Length(TmpStr) - curPos + 1);
AddCustomFieldValueByName('Money', TmpStr);
end;
--- End code ---
if this or something like that remove away.
I hope it's okay and it works.
rick.ca:
--- Quote ---I hope it's okay and it works.
--- End quote ---
As stated in the heading and explained in the preamble, the purpose of this table is only to document the "CUSTOM AND NON-STANDARD FIELD MAPPINGS" used in the script. AKA and Box office are standard fields included in the original script. I don't use them, but I assume they work fine.
Ivek23:
Here I managed to Description the script.
Would need a small help Features code for Features on the same page.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version