2121
Support / Re: IMDb plugin maintenance issues
« on: August 14, 2011, 01:07:44 pm »
New Imdb web style is not transferred to MPAA data, at least for me it is.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Sadly, no help for me. I am wondering why this works for you?
The guys from imdb have changed the layout of their website again. This results in the inability of the imdb script to download the rating. Other fields seem not to be affected.
Imdb rating works, no problems.
Added images.
The guys from imdb have changed the layout of their website again. This results in the inability of the imdb script to download the rating. Other fields seem not to be affected.
Thank you Ivek23 it now works very well and I even discovered options I was not using.
If you search for Dakota (1945), you'll see it's third in the list of search results and therefore wasn't shown. Often duplicate titles are just an original movie and it's remake—so either one would be found in a list of two.
When updating data with AllRovi script for the movie Dakota (1945), I could not find this title in the results table, where several movie with the same title and a different year.
The problem is procedure ParseSearchResults in this part of code:
Thanks. I've been wondering why some search result dialogs had only two entries.
Hi Ivek23 and Rick, I already thanked you for this but hey thank you again!
I have a slight problem. For some reason, Allrovi script does not gather the rating anymore. I have not changed anything to the preferences, the "additional rating" box is checked. I wonder if there was a change in the last version that caused this?
GET_RATING = False; //Set to True to add 'Rovi rating' as the standard 'Additonal rating' field
as seen above.
...
//if there are more movies with the same or similar title...
curPos := Pos('<div class="results">', HTML);
if curPos < 1 then
Exit;
curPos := PosFrom('<a href="http://www.allrovi.com/movies/', HTML, curPos);
while curPos > 0 do begin
endPos := PosFrom('">', HTML, curPos);
URL := Copy(HTML, curPos + 31, endPos - curPos - 31);
URL := BASE_URL + URL;
curPos := PosFrom('">', HTML, curPos);
endPos := PosFrom('</a>', HTML, curPos);
Title := Copy(HTML, curPos + 2, endPos - curPos - 2);
curPos := PosFrom('<td class="year">', HTML, curPos);
endPos := PosFrom('</td>', HTML, curPos);
Year := Trim(Copy(HTML, curPos + 17, endPos - curPos - 17));
AddSearchResult(Title, '', Year, URL, '');
curPos := PosFrom('" href="/movies/', HTML, curPos);
end;
end;
function NextMode(curMode : Integer) : Integer;
...
//if there are more movies with the same or similar title...
curPos := Pos('<div class="results">', HTML);
if curPos < 1 then
Exit;
curPos := PosFrom('<a href="http://www.allrovi.com/movies/', HTML, curPos);
while curPos > 0 do begin
endPos := PosFrom('">', HTML, curPos);
URL := Copy(HTML, curPos + 31, endPos - curPos - 31);
URL := BASE_URL + URL;
curPos := PosFrom('">', HTML, curPos);
endPos := PosFrom('</a>', HTML, curPos);
Title := Copy(HTML, curPos + 2, endPos - curPos - 2);
curPos := PosFrom('<td class="year">', HTML, curPos);
endPos := PosFrom('</td>', HTML, curPos);
Year := Trim(Copy(HTML, curPos + 17, endPos - curPos - 17));
AddSearchResult(Title, '', Year, URL, '');
curPos := PosFrom('<a href="http://www.allrovi.com/movies/', HTML, curPos);
end;
end;
function NextMode(curMode : Integer) : Integer;
I'll upload version 1.1 now. The change is referenced to your message above, so there's no need to post a script or explanation anywhere else.OK, I understand.
I'm seeing a few movies that aren't getting the Characteristics info, such as Phantom Love.
//'Synopsis' saved to ~mfDescription~
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);
TmpStr3 := TextBetween(HTML, '<span>by ', '</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') AND (Pos('©', TmpStr2) = 0) then
AddFieldValue(mfDescription, TmpStr2 + #13 + '—' + TmpStr3)
else
if (TmpStr4 <> 'synopsis') OR (Pos('©', TmpStr2) = 1) then
LogMessage(' Synopsis: Not available');
Copy here as shown in the attached code//~AMG ID~
TmpStr := HTMLValues(HTML,
'<dt>AMG ID</dt>', '</dd>',
'<pre>', '</pre>',
', ', endPos);
AddCustomFieldValueByName('AMG ID', TmpStr);
//'Synopsis' saved to ~mfDescription~
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);
TmpStr3 := TextBetween(HTML, '<span>by ', '</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') AND (Pos('©', TmpStr2) = 0) then
AddFieldValue(mfDescription, TmpStr2 + #13 + '—' + TmpStr3)
else
if (TmpStr4 <> 'synopsis') OR (Pos('©', TmpStr2) = 1) then
LogMessage(' Synopsis: Not available');
end;
procedure ParseSearchResults(HTML : String);
I think the new update field is a really good idea (it would be nice if a similar field for the imdb script exists ... but that’s another point). Unfortunately, the date format is not similar to the date format of the "added" and "modified" fields.
I have another issue with the "modified" field. I am not sure if this is related to the script or a more general problem of PVD.I think, this is more
a more general problem of PVD
I'm not worried. I know my co-author will monitor the situation closely, and make changes before I even realize they're necessary.
Once again, Ivek, thanks very much for your hard work and persistence in making this script possible.
QuoteThis is it and ready for all other registered or unregistered users in the Download section.
It should be included in the auto-update system. Nostra would have to explain to us how and where to upload updated scripts. I assume they just need to be put in a particular directory (and it may be the same as that used for files in the Download section), but I don't know.