Author Topic: IMDB_[EN][HTTPS].psf  (Read 5303 times)

0 Members and 1 Guest are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
IMDB_[EN][HTTPS].psf
« on: September 24, 2021, 10:46:01 am »
Hello Ivek.

Thank you so much for tremendous efforts to keep PVD live, especially with the recent IMDb and AllMovie script updates, which needed a lot of work and rewritings.

I have a question - do you, or anyone else know why "Title" isn't equal anymore with "Localized Title" when importing data? It should be the same since IMDb reads my IP and if there is localized title, it imports it in "Title" as such, making it equal with "Localized Title", right?

Or, am I missing something? I know this because of my skin. I had original "Title" field and until the end of July it always imported in that field localized title if there was one, but not anymore.

Thanks in advance for any thoughts or ideas on this.
« Last Edit: September 24, 2021, 10:53:44 am by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #1 on: September 26, 2021, 08:53:18 am »
Hello Ivek.

Thank you so much for tremendous efforts to keep PVD live, especially with the recent IMDb and AllMovie script updates, which needed a lot of work and rewritings.

Welcome.

I have a question - do you, or anyone else know why "Title" isn't equal anymore with "Localized Title" when importing data? It should be the same since IMDb reads my IP and if there is localized title, it imports it in "Title" as such, making it equal with "Localized Title", right?

Or, am I missing something? I know this because of my skin. I had original "Title" field and until the end of July it always imported in that field localized title if there was one, but not anymore.

Thanks in advance for any thoughts or ideas on this.

This is now possible because changing the IMDb layout has also changed the code format in the IMDB_ [EN] [HTTPS] script. I have now made changes to the IMDB_ [EN] [HTTPS] _RC3 script, which can be found at the link below. there is also more information made in the IMDB_ [EN] [HTTPS] _RC3 script.

http://www.videodb.info/forum_en/index.php?topic=4183.msg21468#msg21468

In my case, I can change the language and country on the IMDb web pages in Content Settings because I am registered with imdb.com. You can try to register on IMDb, maybe something will help. If not, the option described above is still possible.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #2 on: September 26, 2021, 01:14:41 pm »
More info for IMDB_ [EN] [HTTPS](series) _RC and IMDB_ [EN] [HTTPS](episodes) _RC scripts can be found at the link below.

http://www.videodb.info/forum_en/index.php/topic,4183.msg21471.html#msg21471
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #3 on: September 27, 2021, 07:14:29 pm »
Wow!!! These additions and upgrades will need so much time to enjoy them all. As much as I am grateful to you, I am also extremely desparate: my PVD is 32GB big and I really don't know what I will do once you get tired of supporting PVD and us... There is simply no alternative out there worthy enough to PVD, paid or free...

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #4 on: October 07, 2021, 11:08:13 am »
More info for IMDB_[EN] [HTTPS]_RC3a, IMDB_[EN] [HTTPS](series)_RCa and IMDB_[EN] [HTTPS](episodes)_RCa scripts can be found at the link below.

http://www.videodb.info/forum_en/index.php/topic,4183.msg21491.html#msg21491
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #5 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!!!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #6 on: February 10, 2022, 09:14:25 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!!!

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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #7 on: February 10, 2022, 03:38:26 pm »
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?

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #8 on: February 10, 2022, 07:15:01 pm »
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
or changes only to this
Quote
-debug -portable

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: [Select]
    //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;

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.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 444
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #9 on: February 13, 2022, 02:20:40 am »
Thank you Ivek. It works perfectly!  :)

I gues it was a problem with the movies that don't have reviews. You saved me again!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2667
    • View Profile
Re: IMDB_[EN][HTTPS].psf
« Reply #10 on: February 13, 2022, 08:15:39 am »
Thank you Ivek. It works perfectly!  :)

I gues it was a problem with the movies that don't have reviews. You saved me again!

Welcome.

Yes, you have come correctly to the correct completion and concluding your problems that have been resolved.

The correction will be included in the new version of IMDB_ [EN] [HTTPS] script and will soon be available.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything