English > PVD Python Scripts
PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
afrocuban:
--- Quote from: afrocuban on November 14, 2025, 01:46:15 am ---
My next goal is to include new switch in the Script Configurator - UPDATE_DYNAMIC_VALUES_ONLY, by adding few dozens of lines into movie selenium script that would call only main page and update only dynamic values like: Rating, Top 250, Bottom 100, Number of votes. And for the Awards summary when the movie is not older than 2 years than current date catching fresh wins for recent releases.
--- End quote ---
Well, I finished it earlier than expected, for IMDb Movie script. Also with a lot of chalenges I have redesigned Script Configurator once again, bringing new functionalities:
--- Quote --- //Retreive Data Config
USE_SAVED_PVDCONFIG = True ; // ***PVDCONFIG*** - Turn this ON to unlock and change the options below (from pvdconf.ini). Settings are applied when you click "Save All Script Configurations (Personal Video Database will automatically restart)" button below. Use carefully!
//############################################
//# All options below require USE_SAVED_PVDCONFIG
//# to be enabled so the Script Configurator
//# can apply your settings correctly.
//############################################
UPDATE_DYNAMIC_VALUES_ONLY = True ; //Update only dynamic values such as: Rating, Top 250, Metascore, Number of votes. Also update the Awards summary when the movie is less than 2 years old, to capture fresh wins for recent releases. Deselect to enable the options
//################################################
//# All options below require UPDATE_DYNAMIC_VALUES_ONLY
//# to be enabled so the Script Configurator
//# can apply your settings correctly.
//###############################################
--- End quote ---
So you can see in the screenshots that now checking specific boxes disables or enables other options. Which means that....
--- Quote from: afrocuban on November 13, 2025, 07:40:43 pm ---My plan is versions to stay on v4.2 for a long time unless something significant in their design changes.
--- End quote ---
my plan will not last long since thee changes are huge for users to make them easy navigating and choosing proper options withoout to much contemplating, so with this I will soon go to 4.3.
But I still will not publish anything, because I want to finish People and FA scripts in terms of UPDATE_DYNAMIC_VALUES_ONLY, and I also want to further tweak Script Configurator GUI. I just hate "Save button" will not autosize to the last option in each tab, so for example in a People and FA tab we have to scroll all the way down. That is not just visual thing, but I rather want to implement "Apply" button that will be applied to each tab independently, while we will have overall "Cancel" and "Save & Restart PVD" button. That is tremendous challenge for ahk, that made me last year even to start creating GUI with python, but at the moment it looked even more difficult with python, so I abandoned it then. Now it looks the time to try it again is spot on.
afrocuban:
New v4.3 Files
Most comprehensive and stable I have done so far. Two main things:
1. New PVD Scripts Configurator built from scratch in Python Tkinter. Much better GUI than AHK.
Nice quirk - I have introduced dark/light theme for it as in the first photo. Reordered tabs, so default tab is IMDb Movie tab. You can still use both configurators (second photo - new Configurator has prefix "py"), all updated to v4.3, same options and functionalities. I'm giving them all now, for continuity, but in the future, most probably I will discontinue AHK. In any case, I'm giving .ahk file so anyone can maintain it in the future. I will stick to Python TKinter GUI.
2. As anounced earlier, new **UPDATE DYNAMIC VALUES ONLY** switch for a fast update of only certain dynamic fields.
From the Change logs:
IMDb Movie Script
--- Quote ---
CHANGE LOG :
V 4.3.0.1 (11/15/2025) afrocuban: Script Configurator Enhancements
-------------------------------------------------------------------------------
- Built from the scratch new PythonTkinter Script Conigurator:
• It has all the functionalities as AHK.
• Plus litght/dark theme developed
• Unlike AHK can be used as a standalone application with the same effect as when invoked in PVD.
- Added new feature in Script Configurator to enable and manage saved settings from `pvdconf.ini`:
• **USE SAVED PVDCONFIG** now needs to be enabled to unlock configuration options below.
• This allows users to apply settings that require a restart of Personal Video Database upon saving.
• **Use this setting carefully!** Any changes will take effect only after clicking "Save All Script Configurations" (which will restart the application).
- **UPDATE DYNAMIC VALUES_ONLY**:
• Allows users to update only **dynamic values** like Rating, Top 250, Metascore, and Number of votes.
• Updates the **Awards summary** for movies released within the last two years, capturing recent wins for fresh releases.
• When disabled, additional configuration options become available for comprehensive updates.
• Now poster can be downloaded from any page - separate procedure provided for it in Script Configurator,
• Single Instance in Script Configurator. No more flooding with multiple instance by mistake.
• Redesigned whole script to now accept UPDATE DYNAMIC VALUES ONLY switch properly
--- End quote ---
FilmaFfinity Script
--- Quote ---CHANGE LOG :
V 4.3.0.1 (11/27/2025) afrocuban: Script Configurator Enhancements
-------------------------------------------------------------------------------
- Built from the scratch new PythonTkinter Script Conigurator:
• It has all the functionalities as AHK.
• Plus litght/dark theme developed
• Unlike AHK can be used as a standalone application with the same effect as when invoked in PVD.
- Added new feature in Script Configurator to enable and manage saved settings from `pvdconf.ini`:
• **USE SAVED PVDCONFIG** now needs to be enabled to unlock configuration options below.
• This allows users to apply settings that require a restart of Personal Video Database upon saving.
• **Use this setting carefully!** Any changes will take effect only after clicking "Save All Script Configurations" (which will restart the application).
- **UPDATE DYNAMIC VALUES_ONLY**:
• Allows users to update only **dynamic values** like Rating, Number of votes and Awards for movies made in last 2 years.
• When disabled, additional configuration options become available for comprehensive updates.
--- End quote ---
IMDb People Script
--- Quote ---
CHANGE LOG :
V 4.3.0.1 (11/27/2025) afrocuban: Script Configurator Enhancements
-------------------------------------------------------------------------------
- Built from the scratch new PythonTkinter Script Conigurator:
• It has all the functionalities as AHK.
• Plus litght/dark theme developed
• Unlike AHK can be used as a standalone application with the same effect as when invoked in PVD.
- Added new feature in Script Configurator to enable and manage saved settings from `pvdconf.ini`:
• **USE SAVED PVDCONFIG** now needs to be enabled to unlock configuration options below.
• This allows users to apply settings that require a restart of Personal Video Database upon saving.
• **Use this setting carefully!** Any changes will take effect only after clicking "Save" (which will restart the application).
- **UPDATE DYNAMIC VALUES_ONLY**:
• Allows users to update only **dynamic values** for persons that were alive at the moment of adding them to PVD, or at their last update. Updating only from the Main page.
• When disabled, additional configuration options become available for comprehensive updates.
--- End quote ---
afrocuban:
Here are v4.3 scripts.
1. Unpack the first 7z in "PersonalVideoDB" folder (3 files, overwrite existing, but backup them first if you want).
2. Unpack the second 7z in your "Scripts" folder. It is safe to move everything from it before extracting. These are all you need to safely run PVD with python.
You need all of these in order PVD to run as intended. Especially People script is complex, since I have integrated options to make it easier to dynamically update them and not to wait at all for deceased or the people that have only name and url. Test it.
If something desn't work, first check:
1. That you are running same version of Chrome and chromedriver.
2. That you installed whatever is needed for Python to work as described so far on this topic.
If that doesn't help, please publish screenshots and logs, so I could reproduce the issue too and being able to fix it.
Please test and let me know if everything work or not.
Enjoy!
Ivek23:
I tested it, IMDB_Movie_[EN][Selenium]-v4.psf and IMDB_People_[EN][Selenium]-v4.psf work fine, with some errors in certain information, where it will be necessary to fix parts of the code in the scripts. The errors have been there for a long time and have not been fixed. The code fixes will be described and added below.
As for FilmAffinity_Movie_[EN][Selenium]-v4.psf, I have not tested it.
Ivek23:
IMDB_Movie_[EN][Selenium]-v4.psf
Fixed part of the code in Function ParsePage_IMDBMovieMPAA
Previous
--- Code: --- // Get (CF~IMDbmpaaSummary~)
curPos := Pos('<select id="jump-to"', HTML);
If curPos > 0 Then
Begin
// Extract the relevant section for categories
curPos := PosFrom('<option', HTML, curPos);
endPos := PosFrom('</select>', HTML, curPos);
mpaaSection := Copy(HTML, curPos, endPos - curPos);
LogMessage('Function ParsePage_IMDBMovieMPAA - Extracted Category section for (CF~IMDbmpaaSummary~): ' + mpaaSection);
// Parse the options and category names
curPos := 1;
mpaaContent := '';
While PosFrom('<option', mpaaSection, curPos) > 0 Do
Begin
curPos := PosFrom('<option', mpaaSection, curPos) + Length('<option');
optionValue := TextBetween(mpaaSection, 'value="', '">', False, curPos);
categoryName := TextBetween(mpaaSection, '">', '</option>', False, curPos);
// Format the category link
mpaaContent := mpaaContent + '<link url="' + MovieURL + optionValue + '">' + categoryName + ' • </link>';
// Move to the next position
curPos := PosFrom('</option>', mpaaSection, curPos) + Length('</option>');
End;
// Remove the trailing " • " if it exists and keep the last </link> intact
If Copy(mpaaContent, Length(mpaaContent) - 13, 7) = ' • ' Then
Begin
mpaaContent := Copy(mpaaContent, 1, Length(mpaaContent) - 14) + '</link>';
End;
// Combine and format the final result
mpaaContent := '<link url="' + MovieURL + '#contentRating' + '">Content Ratings Summary: </link>' + mpaaContent;
// Store the result in the custom field
AddCustomFieldValueByName('IMDbmpaaSummary', mpaaContent);
LogMessage('Function ParsePage_IMDBMovieMPAA - Stored result for (CF~IMDbmpaaSummary~)');
End
Else
Begin
LogMessage('Function ParsePage_IMDBMovieMPAA - Content Rating section for (CF~IMDbmpaaSummary~) not found');
//Result := prError; // Set to error if content rating section is not found
End;
--- End code ---
Fixed
--- Code: --- // Get (CF~IMDbmpaaSummary~)
curPos := Pos('<select id="jump-to"', HTML);
If curPos > 0 Then
Begin
// Extract the relevant section for categories
curPos := PosFrom('<option', HTML, curPos);
endPos := PosFrom('</select>', HTML, curPos);
mpaaSection := Copy(HTML, curPos, endPos - curPos);
LogMessage('Function ParsePage_IMDBMovieMPAA - Extracted Category section for (CF~IMDbmpaaSummary~): ' + mpaaSection);
// Parse the options and category names
curPos := 1;
mpaaContent := '';
While PosFrom('<option', mpaaSection, curPos) > 0 Do
Begin
curPos := PosFrom('<option', mpaaSection, curPos) + Length('<option');
optionValue := TextBetween(mpaaSection, 'value="', '">', False, curPos);
categoryName := TextBetween(mpaaSection, '">', '</option>', False, curPos);
// Format the category link
// mpaaContent := mpaaContent + '<link url="' + MovieURL + optionValue + '">' + categoryName + ' • </link>';
mpaaContent := mpaaContent + '<link url="' + MovieURL + optionValue + '">' + categoryName + '</link> • ';
// Move to the next position
curPos := PosFrom('</option>', mpaaSection, curPos) + Length('</option>');
End;
// Remove the trailing " • " if it exists and keep the last </link> intact
If Copy(mpaaContent, Length(mpaaContent) - 13, 7) = ' • ' Then
Begin
mpaaContent := Copy(mpaaContent, 1, Length(mpaaContent) - 14) + '</link>';
End;
// Combine and format the final result
//mpaaContent := '<link url="' + MovieURL + '#contentRating' + '">Content Ratings Summary: </link>' + mpaaContent;
mpaaContent := '<link url="' + MovieURL + '#contentRating' + '">Content Ratings Summary:</link> ' + mpaaContent;
// Store the result in the custom field
AddCustomFieldValueByName('IMDbmpaaSummary', mpaaContent);
LogMessage('Function ParsePage_IMDBMovieMPAA - Stored result for (CF~IMDbmpaaSummary~)');
End
Else
Begin
LogMessage('Function ParsePage_IMDBMovieMPAA - Content Rating section for (CF~IMDbmpaaSummary~) not found');
//Result := prError; // Set to error if content rating section is not found
End;
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version