(If some movie fails, please send me the title, the bad information and the search language. Thank you.)
Yes, I found bugs in Search Results:
LANG_STR = '?language=es';
in this movie
World Trade Center find a cosmetic bug in Search Results:
Problematic is the following piece of code,
curPos:=PosFrom('"poster_path":"',HTML,endPos)+Length('"poster_path":"'); //WEB_SPECIFIC
endPos:=PosFrom('"',HTML,curPos); //WEB_SPECIFIC
PreviewURL:='http://image.tmdb.org/t/p/w92'+Copy(HTML,curPos,endPos-curPos); //WEB_SPECIFIC. w92,w185,w300,w342,original.
LogMessage(' Parse Results PreviewURL:'+PreviewURL+'||');
when displaying search results, only three addresses are correct, the fourth, which link does not work, and the fifth title of the copies of the first and second title in search results.
After correcting this part of the code
function ParsePage(HTML:String;URL:AnsiString):Cardinal;
var
curPos,endPos,NumbResult:Integer;
Title,OriTitle,Year,MovieURL,PreviewURL1,PreviewURL,ItemValue,ItemList,Name,Role,PersonURL:String;
begin
.
.
.
LogMessage(' Parse Results Year:'+Year+'||');
curPos:=PosFrom('"poster_path":',HTML,endPos)+Length('"poster_path":'); //WEB_SPECIFIC
endPos:=PosFrom('"popularity"',HTML,curPos); //WEB_SPECIFIC
PreviewURL1:='http://image.tmdb.org/t/p/w92'+Copy(HTML,curPos,endPos-curPos); //WEB_SPECIFIC. w45,w92,w185,w300,w342,original.
PreviewURL1 := StringReplace(PreviewURL1, '"', '', True, True, False);
PreviewURL1 := StringReplace(PreviewURL1, 'null', '', True, True, False);
PreviewURL:=PreviewURL1; //WEB_SPECIFIC. w45,w92,w185,w300,w342,original.
LogMessage(' Parse Results PreviewURL:'+PreviewURL+'||');
.
.
.
but now the search results with the correct movie titles.
In this movie
Blade find a cosmetic bug in Search Results:
Search results the appear with larger the number of movie titles,then occurs several times the same set of movie titles, actually a four times.
//Not Implemented get information of "popularity" "vote_count" "keywords" "images"
"keywords" also means "tags" and the normal
Tags field in PVD
AddFieldValueXML('tags',ItemValue);
"vote_count" it can be custom
TheMoviedb Votes field in PVD.
It may help this one piece of code:
//~Votes~
curPos := PosFrom('"vote_count":', HTML, EndPos);
if curPos > 0 then begin
curPos := PosFrom('"vote_count":', HTML, EndPos);
endPos := PosFrom(',"alternative_titles"', HTML, curPos);
TmpStr1 := TextBetween(HTML, '"vote_count":', ',"alternative_titles"', True, curPos);
if TmpStr1 = '0' then
TmpStr1 := '';
AddCustomFieldValueByName('TheMoviedb Votes', TmpStr1);
if TmpStr1 = '' then
TmpStr1 := 'vote unknown';
end;