Author Topic: New IMDb People v3 (Selenium) script  (Read 77 times)

0 Members and 1 Guest are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 564
    • View Profile
New IMDb People v3 (Selenium) script
« on: January 04, 2025, 04:31:58 am »
Completely new IMDb People script with integrated Python+Selenium script. Put selenium script to the Scripts folder of your PVD too.


Everything works now, except (for me at least) populating photo to database. Please check and report if it works for you.


From the Change log -


Quote
CHANGE LOG :
            V 3.0.0.1 (04/01/20253) afrocuban (THANKS TO IVEK'S HUGE HELP):
         - Selenium integration to PVD introduced. Check http://www.videodb.info/forum_en/index.php/topic,4368.0.html and
         http://www.videodb.info/forum_en/index.php?topic=4367.0 for more
         - Awards properly parsed now (HUGE THANKS TO IVEK HERE!!!).
         - Birthplace, Filmography Bio and Genre field fixed. 
         - DownloadPage and ParsePage functions modified to split downpage-UTF8_NO_BOM.htm into downloading different file for each function:                       Awards, Bio, Credit and Genre. Main (Prncipal) page still downloaded with PVdBDownPage.exe to downpage-UTF8_NO_BOM.htm
         - New HandlePhoto function to separately parse and add photo to record.
« Last Edit: January 04, 2025, 05:08:26 am by afrocuban »

Offline afrocuban

  • Moderator
  • *****
  • Posts: 564
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #1 on: January 04, 2025, 07:20:20 am »
If Ivek is willing to rewrite it to scrape everything from a single downpage-UTF8_NO_BOM.htm it would be great. I couldn't manage to do that

Offline afrocuban

  • Moderator
  • *****
  • Posts: 564
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #2 on: January 04, 2025, 08:38:56 am »
Here's optimized selenium script, that reduces time wait significantly. Just replace it in your Script folder.
« Last Edit: January 04, 2025, 12:45:09 pm by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2765
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #3 on: January 04, 2025, 04:22:15 pm »
If Ivek is willing to rewrite it to scrape everything from a single downpage-UTF8_NO_BOM.htm it would be great. I couldn't manage to do that

I found a solution, the script now also uploads people's photos to the database. I will add it to the forum tomorrow at the latest.
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: 564
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #4 on: January 05, 2025, 10:34:53 pm »
This is my final IMDB People script that now populates people's photos to database, thanks to Ivek who resolved it.


I am introducing new naming convention for my scripts, with a word "Selenium" in it and a version, since https is now fully covered by Selenium scripts.


Delete any of mine previous scripts, .psf or .py, and replace them with these.


First Selenium script downloads people's Base/Main page, and the other Selenium script downloads other four: Bio, Credit, Genres and Awards. In .psf script I have also introduced dynamic waiting for the Selenium script's downloading to finish in order to optimize timings for smaller and bigger datasets, in order user as rare as possible to click on a "Retry" button when asked.


Selenium scripts are now optimized with multithreading downloading, so downloading now for average person is only 25-30 seconds!

TO DO: to incorporate searching for people, back to all-in-one script.
« Last Edit: January 06, 2025, 01:11:00 am by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2765
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #5 on: January 06, 2025, 12:08:51 pm »
Excellent work.
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: 564
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #6 on: January 06, 2025, 01:30:57 pm »
Thank you, but impossible without you in crucial moments! I am genuinely greatful to you!

« Last Edit: January 06, 2025, 01:54:05 pm by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2765
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #7 on: January 06, 2025, 06:39:08 pm »
Thank you, but impossible without you in crucial moments! I am genuinely greatful to you!

No problem.
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: 2765
    • View Profile
Re: New IMDb People v3 (Selenium) script
« Reply #8 on: January 06, 2025, 09:59:46 pm »
selenium_script-People_4_pages_v3.2 script does not transfer all awaeds data because it does not open all more buttons for you, at least it was the case for me.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything