English > Scripts and Templates
Filmweb.pl
sinus:
Corrected and file attached to the first post :)
Ivek23:
--- Quote from: sinus on January 12, 2011, 09:05:19 am ---Corrected and file attached to the first post :)
--- End quote ---
Thanks
--- Quote from: Ivek23 on January 12, 2011, 07:17:33 am ---The duration of the film shows is not correct.
For example:
in your case 00:02:04
proper 02:04:00
--- End quote ---
Now it 's okay.
Can you tell me, how to add such rating
--- Code: ---//orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
AddFieldValueXML('orating', lStr);
Log(lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
end;
--- End code ---
or other added to the custom field.
sinus:
If I understand correctly your intention, for example: you use another script for get movies info and from my you want only get rating? I upload new version near midnight.
Ivek23:
--- Quote from: sinus on January 12, 2011, 11:24:02 am ---If I understand correctly your intention, for example: you use another script for get movies info and from my you want only get rating? I upload new version near midnight.
--- End quote ---
Sorry if we did not properly understand,script is fine, my only interest this code
--- Code: ---//orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
AddFieldValueXML('orating', lStr);
Log(lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
end;
--- End code ---
how the rating or anything else added to the custom field.
If you will upload the new script should be added separately (that other users can still download this script, which is the first post) and somehow marked or written in a post that will be known to have added a custom field.
Thank you for your understanding.
BTW: About something like it in AllMovie+ script .
sinus:
I uploaded new version. Rating is also added as custom field but maybe its useless if someone will use my script as the main script to gather movies info.
--- Code: --- //orating
i := Pos('<span class="average">', HTML);
if i>0 then
begin
i := PosFrom('>', HTML, i);
j := PosFrom('<', HTML, i);
lStr := Copy(HTML, i+1, j-i-1);
lStr := StringReplace(lStr, ',', '.', true, true, false);
Log('Rating: '+lStr);
AddFieldValueXML('orating', lStr);
AddFieldValueXML('orname', 'Filmweb.pl');
AddCustomFieldValueByName(cCF_Rating, lStr);
end;
--- End code ---
As you see, to custom fields you must use AddCustomFieldValueByName(fieldName, value) where fieldName is matched to field name in "Tools -> Preferences -> Movies -> Custom fields".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version