English > Support
Personal Video Database 1.0.2.7 MOD
jondak:
Found a bug in the last version in the IMDB_ [EN] [HTTPS] script in both 9.9.2.1 and 1.0.2.7
The error comes if the Script configuration box is ticked: Download "Also know as' provider page for retrieve the info...
If the box is not checked the script works and saves the info.
I atached the bug report.
I got the error while i tryed to update the following movies:
Calendar Girl (2011) https://www.imdb.com/title/tt1611816/
The Brazen Bull (2010) https://www.imdb.com/title/tt1415284/
The script worked till 16.11.2018, probably something changed to imdb site
Ivek23:
--- Quote from: jondak on November 17, 2018, 08:44:27 pm ---Found a bug in the last version in the IMDB_ [EN] [HTTPS] script in both 9.9.2.1 and 1.0.2.7
The error comes if the Script configuration box is ticked: Download "Also know as' provider page for retrieve the info...
If the box is not checked the script works and saves the info.
I atached the bug report.
I got the error while i tryed to update the following movies:
Calendar Girl (2011) https://www.imdb.com/title/tt1611816/
The Brazen Bull (2010) https://www.imdb.com/title/tt1415284/
The script worked till 16.11.2018, probably something changed to imdb site
--- End quote ---
Yes, a small change in the source code of the page.
This is to fix it and it's working again.
--- Quote ---Function ParsePage_IMDBMovieAKA(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If żany big problem? with exit;
//Retrieve: ~aka~ "Also Known As"
Var
curPos,endPos,index:Integer;
ItemValue,ItemList:String;
ItemArray: TWideArray;
Begin
LogMessage('Function ParsePage_IMDBMovieAKA BEGIN=====================||');
Result:=prFinished; //It will change to prError if any big problem with exit;
//Get ~aka~ (several values in a line break separated list) Be careful don't repeat
if (Pos('It looks like we don'+Chr(39)+'t have any AKAs for this title yet.',HTML)>0) then Exit;
//Go to "Also Known As"
//curPos:=Pos('<h4 class="li_group">Also Known As (AKA)',HTML);
curPos:=Pos('class="ipl-list-title">Also Known As (AKA)',HTML); //Strings start which opens the block content data. WEB_SPECIFIC
--- End quote ---
jondak:
Thank you.
The fix worked for the titles i linked. But it seems not all titles are made the same :-\
Dai juk hei kek (2012) https://www.imdb.com/title/tt2266938/ has a crash also.
Maybe is from the chirilic alphabet on the AKA page?
Cheers.
Ivek23:
--- Quote from: jondak on November 22, 2018, 07:56:17 am ---Thank you.
The fix worked for the titles i linked. But it seems not all titles are made the same :-\
--- End quote ---
Thanks.
--- Quote from: jondak on November 22, 2018, 07:56:17 am ---Dai juk hei kek (2012) https://www.imdb.com/title/tt2266938/ has a crash also.
Maybe is from the chirilic alphabet on the AKA page?
Cheers.
--- End quote ---
No, it was not what you thought, but was missing the name for the country. This should now solve the problem, at least it worked for me.
--- Quote ---Function ParsePage_IMDBMovieAKA(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError;
//Retrieve: ~aka~ "Also Known As"
Var
curPos,endPos,index:Integer;
ItemValue,ItemList:String;
ItemArray: TWideArray;
Begin
LogMessage('Function ParsePage_IMDBMovieAKA BEGIN=====================||');
//Get ~aka~ (several values in a line break separated list) Be careful don't repeat
Result:=prFinished;
if (Pos('It looks like we don'+Chr(39)+'t have any AKAs for this title yet.',HTML)>0) then Exit;
//Go to "Also Known As"
//curPos:=Pos('<h4 class="li_group">Also Known As (AKA)',HTML);
curPos:=Pos('class="ipl-list-title">Also Known As (AKA)',HTML); //Strings start which opens the block content data. WEB_SPECIFIC
curPos:=PosFrom('</h4>',HTML,curPos); //Strings end which opens the block content data. WEB_SPECIFIC
curPos:=curPos+Length('</h4>'); //Strings end which opens the block content data. WEB_SPECIFIC
//Get all "raw" list aka for create good values separators
endPos:=PosFrom('</table>',HTML,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemList:=Copy(HTML,curPos,endPos-curPos);
ItemList:=StringReplace(ItemList,'<td class="aka-item__name--empty"></td>','(Empty)|',True,True,False); //Fill the empty values (in countries) con in order to asure that ExplodeString get a value. WEB_SPECIFIC
ItemList:=StringReplace(ItemList,'<td></td>','(Empty)|',True,True,False); //Fill the empty values (in countries) con in order to asure that ExplodeString get a value. WEB_SPECIFIC
ItemList:=StringReplace(ItemList,'</td>','|',True,True,False); //WEB_SPECIFIC
//Get all aka list (NOT necesary in raw because: Several couple of valors (Country/title) but the first is the original title
ItemList:=RemoveTags(ItemList, False);
--- End quote ---
Ivek23:
--- Quote from: Ivek23 on October 29, 2018, 08:43:14 pm ---
--- Quote from: VVV_Easy_Programing on October 29, 2018, 07:49:50 pm ---And get only Movies not TV Episodes? Is it possible?
--- End quote ---
I will see what to do with this case. I do not know the result at the moment, because when I created the Imdb Movie (connections) script, nobody not mentioned this problem already at that time. At that time, I did not tested it, and then repaired it or already found a way, how to find the option to download all records or records without TV Episodes.
--- End quote ---
Yes, I found a way to remove the episode from the records. Here is a filter that removes everything except movies records.
Example code:
--- Quote ---Function ParsePage_IMDBMovieCONNECTIONS(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If żany big problem? with exit
//Retrieve: ~links~
Var
//curPos:Integer;
curPos,endPos,index:Integer;
debug_pos1:Integer;
//ItemValue,ItemList:String;
OrigTitle,Title,Category3,Category2,Category1,Category,URL,Year:String;
Begin
.
.
.
//Movie Connections Category for the Connections Title of Category
//Get "Connections" info
curPos:=Pos('<h1 class="header">Connections</h1>',HTML);
if (curPos=0) then Exit;
EndPos:=curPos;
//Title of Movies for the Connections Category into the PVD database
//Get "follows" info
curPos:=PosFrom('<a id="follows" name="follows"></a>',HTML,EndPos);
If 0<curPos Then Begin
EndPos:=curPos;
curPos:=PosFrom('<h4 class="li_group">',HTML,curPos);
endPos :=PosFrom('</h4>',HTML,curPos);
Category:=TextBetween(HTML,'<h4 class="li_group">','</h4>',false,curPos);
If Category <> '' then LogMessage(' Get result Category:'+Category+'||');
//end;
curPos:=PosFrom('" ><a href="/title/',HTML,curPos);
index:=1;
while (curPos > 0) AND (curPos < PosFrom('<h',HTML,endPos)) do begin
endPos:=PosFrom('">',HTML,curPos);
URL:='http://www.imdb.com/title/' + TextBetween(HTML,'" ><a href="/title/','">',false,curPos)+'/';
If URL <> '' then LogMessage(' Get result URL:'+URL+'||');
Title:=TextBetween(HTML,'">','</',false,curPos);
If Title <> '' then LogMessage(' Get result Title:'+Title+'||');
Year :=TextBetween(HTML,'(',')',false,curPos);
If Year <> '' then LogMessage(' Get result Year:'+Year+'||');
curPos:=PosFrom('</a>',HTML,endPos)+5;
endPos:=PosFrom('</div>',HTML,curPos);
OrigTitle:=RemoveTags(Copy(HTML,curPos,endPos-curPos),false);
LogMessage(' Get result OrigTitle1:'+OrigTitle+'||');
OrigTitle:=StringReplace(OrigTitle,')(',') (',True,False,True);
debug_pos1:=Pos(' ',OrigTitle);
If debug_pos1 > 0 then OrigTitle:=Copy(OrigTitle,0,debug_pos1-1);
OrigTitle:=StringReplace(OrigTitle,' (TV Movie)','',True,False,True);
If OrigTitle <> '' then LogMessage(' Get result OrigTitle:'+OrigTitle+'||');
//If Pos(': ',Title) < 1 then
If Pos('(TV Episode)',OrigTitle) OR Pos('(TV Series)',OrigTitle) OR Pos('(TV Mini-Series)',OrigTitle) OR Pos('(Short)',OrigTitle) OR Pos('(TV Short)',OrigTitle) OR Pos('(TV Special)',OrigTitle) OR Pos('(Video Game)',OrigTitle) OR Pos('(Video)',OrigTitle) < 1 then
//AddConnection(Title,'',Category,URL,Year);
AddConnection(Title,Title+' '+OrigTitle,Category,URL,Year);
LogMessage(' Get results follows:#'+IntToStr(index)+'|'+Title+'|'+Year+'|'+Category+'||');
curPos := PosFrom('" ><a href="/title/',HTML,curPos);
index:=index+1;
End;
End Else
curPos:=endPos;
--- End quote ---
I added the OrigTitle code, which is essential for filtering records at all and does not change. In the Connection field, the notes will also have a year (for example, For Your Eyes Only (1981)), which is written only in the Original Title field, but not in the Titile field in the PVD database. This option is added so that you often see multiple identical titles of the title of a movie, but the years of the movie outcome are different. This is removed at that time (movie year) when you update the movie record and the Original Title checkbox is confirmed.
I'm currently testing Imdb Movie (connections) script and I'm also looking for options for any additional filters for filtering records.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version