English > Support
IMDB_[EN][HTTPS].psf
afrocuban:
Hello.
Can someone please check if these 2 links can be imported to PVD:
https://www.imdb.com/title/tt3118664/
https://www.imdb.com/title/tt0298045/
Thank you in advance!
IMPORTANT: TEST ONLY IN NEW/EMPTY DATABASE OR IF THE LINKS DON'T WORK YOU MAY CORRUPT YOUR DATABASE!!!
Ivek23:
--- Quote from: afrocuban on February 09, 2022, 02:58:00 am ---Hello.
Can someone please check if these 2 links can be imported to PVD:
https://www.imdb.com/title/tt3118664/
https://www.imdb.com/title/tt0298045/
Thank you in advance!
IMPORTANT: TEST ONLY IN NEW/EMPTY DATABASE OR IF THE LINKS DON'T WORK YOU MAY CORRUPT YOUR DATABASE!!!
--- End quote ---
I had no problem transferring the information for these two links to the new databese with the IMDB_ [EN] [HTTPS] script.
Even with the FilmAffinity_ [EN] [HTTPS] and TheMovieDB_ [EN] [API] scripts, there were no problems downloading basic movie information.
afrocuban:
Hello and thanks Ivek. Now I see that I can also import these movies to the new empty database, but if I try to do that into my existing database, it hangs while importing, the record becomes corrupted, and I have to kill PVD, but even when trying to start it again it won't make it since PVD will try to open on this record and hangs again on opening.
So what I do? I rename database for example to Movies.pvdbak, then open PVD which now opens empty, then rename the database back to Movies.pvd, then open it via PVD->Open database, so problematic record isn't selected by default. Then I search the database for the exact name of the movie, so I get single, corrupted BUT NOT SELECTED record in the list. Then I click on the empty space on the left tree view, then use CTRL+A to select problematic record, and then pres delete+CTRL on my keyboard to delete problematic record. That way I can again access my database.
This problem is only for IMDb. Allmovie, Rottentomatoes and FilmAffinity work without problem to import data for these movies.
It's not about IMDb script also, because in new database it works without problem for this movie, so it's something with the database. Do you have any idea how would I start to track the problem? What would you do if you had such a situation?
Ivek23:
PVD needs to be started in debug mode. In the debug file, the condemning record changes to this record, if it does not already exist,
--- Quote ---start viddb.exe -debug -portable
--- End quote ---
or changes only to this
--- Quote ----debug -portable
--- End quote ---
Then a log file is opened to see where the error might be.
With this connection
https://www.imdb.com/title/tt0298045/
and
https://www.imdb.com/title/tt3118664/
is the wrong code for User Reviews data transfer, so the already mentioned problem occurs.
In IMDB_ [EN] [HTTPS], you replace the old User Reviews code with this new User Reviews code added below.
--- Code: --- //Get ~User Reviews~
curPos:=Pos('<h3 class="ipc-title__text">User reviews',HTML); //WEB_SPECIFIC.
If 0<curPos then begin
curPos:=PosFrom('<div class="ipc-html-content ipc-html-content--base"><div>',HTML,curPos)+Length('<div class="ipc-html-content ipc-html-content--base"><div>');
EndPos:=PosFrom('</div></div><div class="ipc-overflowText-overlay">',HTML,curPos);
ItemValue:=Copy(HTML,curPos,endPos-curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemValue:=StringReplace(ItemValue,'</p>','',True,False,True);
ItemValue:=StringReplace(ItemValue,'</div>','',True,False,True);
ItemValue:=StringReplace(ItemValue,'<ul><li>','',True,False,True);
ItemValue:=StringReplace(ItemValue,'</li></ul>','',True,False,True);
ItemValue:=StringReplace(ItemValue,':)','',True,False,True);
curPos:=Pos('<!DOCTYPE html>',ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('Find showtimes, ',ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('var ue_',ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
curPos:=Pos('aphprotocol.org/schema/',ItemValue);
If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
AddCustomFieldValueByName('User Reviews',ItemValue);
AddCustomFieldValueByName('User Comments',ItemValue);
if ItemValue <> '' then LogMessage(' Get result User Reviews (CF~User Reviews~): <br>'+ItemValue+'||');
End;
--- End code ---
Then test the script with your database, which should not be empty, to see if it is working properly now and the database is not corrupted.
I also had similar problems and solved them with some different approaches (different tricks), so that I could then get rid of the problematic entry in the database and delete it.
afrocuban:
Thank you Ivek. It works perfectly! :)
I gues it was a problem with the movies that don't have reviews. You saved me again!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version