Author Topic: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts  (Read 25716 times)

0 Members and 1 Guest are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 655
    • View Profile
PVD Selenium v4.3 All Scripts
« Reply #40 on: January 06, 2026, 11:37:58 pm »

Merry Christmas and a Happy New Year to everyone.

I am announcing definitive v4.3 scripts. Only description and screenshots in this message because of attachments limit.



Tons of improvements, bugs fixing, stabilizing and other things.


New Search window, with 30 seconds to choose now.


Separated python scripts for IMDb People script.


Fully stabilized and normalized code, now finally easy to navigate through, with as much as possible comments left in the scripts.


New AllMovie and Rottentomatoes scripts as promised to finish in a year:

WISHFUL THINKING:
- Bringing back Allmovie and Rottentomatoes scripts too.

Tons of custom fields for AllMovie and RottenTomatoes.
Also, Rottentomatoes all-in-one script for movies, series and episodes.
Search window for Rottentomatoes to choose Movies or TV Shows to search for.
« Last Edit: January 07, 2026, 01:02:40 am by afrocuban »

Offline afrocuban

  • Moderator
  • *****
  • Posts: 655
    • View Profile
PVD Selenium v4.3 All Scripts
« Reply #41 on: January 06, 2026, 11:44:47 pm »
In this message I'm attaching udl files for Notepad++, which now is perfectly fit for PVD scripting.


Most important - folding and unfolding is now seamless as in the screenshot.


As usual, replace stylers.xml with the given one and import PVD v4.3_2026-01-06.xml and it should look as in the screenshot.
« Last Edit: January 06, 2026, 11:55:08 pm by afrocuban »

Offline afrocuban

  • Moderator
  • *****
  • Posts: 655
    • View Profile
Finally, here are all the scripts.


Never forget to read first message in the topic. All the answers and solutions are there, scripts and PVD to work flawlessly.


As usual, backup and empty Scripts folder and extract Scripts_2026-01-06.7z there. Extract the other file into PVD root folder.

If you want to use the scripts with my skin, you can download it with the list of custom fields here:

https://www.videodb.info/forum_en/index.php/topic,4388.msg23025.html#msg23025

Important note: Since I didn't see even "thanks", or any kind of feedback (except from Ivek, and I haven't seem him recently either) for a more than a year of hard work, I guess there is no interest for these, so I will not update scripts anymore. But anyway, given files are firm base someone else to take over and continue where I left. If I could do it with AI, anyone can.


Best regards.
« Last Edit: January 07, 2026, 11:55:45 am by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2889
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #43 on: January 07, 2026, 07:07:24 pm »
Thank you for all the effort put into creating all the scripts. As for me, I currently have quite a few health problems, so I am currently less present on the forum and currently because of this I am using the PVD program less or very little and testing scripts and the like.

My wish is that you would still help update all the scripts.

As for other users, I assume that some people find it difficult to use or install the python program on their computer, because they may also be less skilled in using such programs.

To clarify, I myself do not know many things about programming, because I am self-taught and have never had courses in using Windows and programming.
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: 2889
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #44 on: January 08, 2026, 10:39:47 am »
It is important to note that you must have the latest version of chromedriver.exe for this to work. Chromedriver always needs to be updated to the latest version, this is a prerequisite for all scripts to work.
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: 2889
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #45 on: January 14, 2026, 08:44:17 am »
It is important to note that you must have the latest version of chromedriver.exe for this to work. Chromedriver always needs to be updated to the latest version, this is a prerequisite for all scripts to work.

Somehow, despite my health problems, I managed to check how the latest IMDb Movie, Allmovie and Rottentomatoes v4 Scripts work. They work fine (with some cosmetic errors when transferring information)  provided that you use the latest chromedriver.exe program in what I mentioned a little higher up.

I didn't check the other scripts.
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: 655
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #46 on: January 14, 2026, 03:58:47 pm »
Thanks Ivek! Wish you a great health!

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2889
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #47 on: January 15, 2026, 07:37:05 am »
Thanks Ivek! Wish you a great health!

Thanks.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Pacifist

  • User
  • ***
  • Posts: 96
    • View Profile
Finally, here are all the scripts.


Never forget to read first message in the topic. All the answers and solutions are there, scripts and PVD to work flawlessly.


As usual, backup and empty Scripts folder and extract Scripts_2026-01-06.7z there. Extract the other file into PVD root folder.

If you want to use the scripts with my skin, you can download it with the list of custom fields here:

https://www.videodb.info/forum_en/index.php/topic,4388.msg23025.html#msg23025

Important note: Since I didn't see even "thanks", or any kind of feedback (except from Ivek, and I haven't seem him recently either) for a more than a year of hard work, I guess there is no interest for these, so I will not update scripts anymore. But anyway, given files are firm base someone else to take over and continue where I left. If I could do it with AI, anyone can.


Best regards.
Thank you for your support of the PVD. But I'm having trouble working with Selenium. I updated ChromeDriver (144.0.7559.59), updated Python (3.14.2). And still, I can't get information from the IMDB. The log file keeps showing no connection.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 655
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #49 on: January 20, 2026, 08:07:00 am »
144.0.7559.31 not 144.0.7559.59
And also, you don't need external sites. Nothing is parsed so far from external sites so far. It was placed there for possible use in the future.

Offline jondak

  • User
  • ***
  • Posts: 38
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #50 on: January 22, 2026, 08:44:31 pm »
Hello,

thank you for your epic work on the keeping the scripts and PVD alive.


After working very well for 3-4 days, today 22.01.2026 I keep getting on keywords, reviews pages download this:

Code: [Select]
<html lang="en"><head>
           "context":"
};
    </script>
    <script src="https://1c5c1ecf7303.8b78215a.eu-north-1.token.awswaf.com/1c5c1ecf7303/e231f0619a5e/0319a8d4ae69/challenge.js"></script>
</head>
<body>
    <div id="challenge-container"></div>
    <script type="text/javascript">
        AwsWafIntegration.saveReferrer();
        AwsWafIntegration.checkForceRefresh().then((forceRefresh) => {
            if (forceRefresh) {
                AwsWafIntegration.forceRefreshToken().then(() => {
                    window.location.reload(true);
                });
            } else {
                AwsWafIntegration.getToken().then(() => {
                    window.location.reload(true);
                });
            }
        });
    </script>
    <noscript>
        <h1>JavaScript is disabled</h1>
        In order to continue, we need to verify that you're not a robot.
        This requires JavaScript. Enable JavaScript and then reload the page.
    </noscript>

</body></html>

After some searching i got this from chatgpt:

What the error actually is the file you’re saving is not the keywords page. It’s an AWS WAF (Web Application Firewall) challenge page returned by IMDb

Key signs from the HTML:

challenge.js
AwsWafIntegration
“verify that you're not a robot”
JavaScript-based token refresh

This means:IMDb detected automation and served a bot-check page instead of real content

Just in case other people get this to fix it in Selenium_Chrome_Movie_Additional_pages_v4:

after driver.get(download_url)

i added:

time.sleep(random.uniform(8, 12))

« Last Edit: January 22, 2026, 08:50:42 pm by jondak »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2889
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #51 on: January 24, 2026, 08:00:58 am »
Just in case other people get this to fix it in Selenium_Chrome_Movie_Additional_pages_v4:

after driver.get(download_url)

i added:

time.sleep(random.uniform(8, 12))

This change does not work because it blocks the download of Additional pages.
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: 655
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #52 on: January 24, 2026, 03:59:39 pm »
This will work most probably, but I think it is fragile too... I am sure soon it will be not possible again, but maybe something new will come up...



Quote
This will work most probably, but I think it is fragile too... I am sure soon it will be not possible again, but maybe something new will come up...

Yes — what you currently have is a classic Selenium workflow:
It spins up a new ChromeDriver instance for each URL.
It applies stealth tweaks, sets cookies, navigates, clicks “See more” buttons, saves HTML, and then quits.
You’re running this in parallel threads (ThreadPoolExecutor(max_workers=4)), so four fresh Chrome sessions at a time.
That’s exactly the pattern IMDb’s AWS WAF is now blocking: fresh, headless, parallel, automation‑fingerprinted sessions.

Why this fails against IMDb now
Headless mode is fingerprinted. Even with stealth, AWS WAF detects it.
Fresh profiles per run (no browsing history, no persistent cookies) scream “bot.”
Parallel sessions look like automation, not human browsing.
Adding fake cookies doesn’t help — WAF requires valid tokens generated by a real browser session.
How to adapt this code to “attach to Chrome”
Instead of creating a new webdriver.Chrome(...) each time, you’d:

Start Chrome manually with debugging enabled

chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\ChromeIMDb"
This opens Chrome with a persistent profile (C:\ChromeIMDb).
You log in once, build up cookies/history naturally.
Change your Selenium init code
Replace:

service = Service(chrome_path)
chrome_options = build_chrome_options(headed=False)
driver = webdriver.Chrome(service=service, options=chrome_options)
With:

service = Service(chrome_path)
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
driver = webdriver.Chrome(service=service, options=chrome_options)
Now Selenium attaches to the Chrome you already opened.
It inherits your cookies, extensions, and fingerprint.
Run serially, not in parallel
IMDb WAF is sensitive to multiple simultaneous sessions.
Change ThreadPoolExecutor(max_workers=4) → max_workers=1.

Important adjustments
Don’t quit the browser (driver.quit()) after each run — that would kill your attached Chrome. Instead, just close tabs (driver.close()) or reuse the same driver.
Remove fake cookie injection — you don’t need it if you’re using your real Chrome profile.
Headed mode only — you’ll see the browser window, but that’s what passes WAF.
In short: your current script is fine for FilmAffinity, but IMDb now requires either:

Attach to Chrome (reuse your real session), or
Switch to IMDb datasets / APIs for long‑term stability.
« Last Edit: January 24, 2026, 04:01:54 pm by afrocuban »

Offline jondak

  • User
  • ***
  • Posts: 38
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #53 on: January 24, 2026, 09:21:38 pm »
Just in case other people get this to fix it in Selenium_Chrome_Movie_Additional_pages_v4:

after driver.get(download_url)

i added:

time.sleep(random.uniform(8, 12))

This change does not work because it blocks the download of Additional pages.


Hello,

without the modification i was getting AWS pages on the additional pages. I attached one example renamed to txt.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 655
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #54 on: January 24, 2026, 10:16:03 pm »
This just sleeps between 8 and 12 seconds and it could be very fragile. Also, it makes whole process longer 1-2 minutes per title?

Offline jondak

  • User
  • ***
  • Posts: 38
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
« Reply #55 on: January 24, 2026, 11:40:08 pm »
This just sleeps between 8 and 12 seconds and it could be very fragile. Also, it makes whole process longer 1-2 minutes per title?

I use Moviedb to get the picture and IMDB Selenium to get the data
Tests:
Witches' Well 2024 https://www.imdb.com/title/tt29793692/ - it took 1 min 55 sec
The Matrix 1999 https://www.imdb.com/title/tt0133093/ - it took 2 min 10 sec

I limited the tags to 300 as above 500 it crashed the database and i had to manually edited it with DBeaver, rest is in the pictures attached.

I run PVD in a win10 VM as in win11 i can't get it download any data.

When i first got the AWS pages instead of the data ones i thought i got ip banned by imdb so i tried to proxy and VPN my connection with no success. I even copied the vm to my computer at work to test and same result.
Then i looked into why i get the pages and the results pointed to the fact i appeared as a bot getting page after page with no "human" pause between them so i added the sleep.

I found other solutions but not tested them:

change: chrome_options = build_chrome_options(headed=False)
to this: headed_mode = "keywords" in download_url
            chrome_options = build_chrome_options(headed=headed_mode)

also this but seemed longer:

add this after page load:

if "challenge.js" in driver.page_source or "AwsWafIntegration" in driver.page_source:
    logging.warning("AWS WAF detected — retrying with longer delay")
    time.sleep(15)
    driver.refresh()
    time.sleep(8 )

Regards
« Last Edit: January 24, 2026, 11:47:36 pm by jondak »

 

anything