English > PVD Python Scripts
PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity Scripts
Ivek23:
--- Quote from: Miguelh1020 on September 12, 2025, 08:42:42 pm ---Hello! I'm trying to make it work with this new system, but when I go to scripts.7z Windows flags SeleniumPVDbScriptsConfig-v4.exe as a threat and won't let me unzip
--- End quote ---
You probably mean the anti-virus program. It's a known issue, from my experiences with the NOD32 Antivirus program it was the same. The solution was when the antivirus program quarantined the SeleniumPVDbScriptsConfig-v4.exe file, I put it back out of quarantine and excluded it from being scanned again by the antivirus program. If necessary, I always repeated the described procedure and thus prevented it from being quarantined again by the antivirus program.
If it still won't be possible to unpack the file, let me know and I'll help you do it another way.
And this notice.
You need the SeleniumPVDbScriptsConfig-v4.exe file to be able to configure the script for transferring information.
It is very likely that the IMDb scripts will not work.
afrocuban:
--- Quote from: afrocuban on March 23, 2025, 01:55:13 am ---Soon, /reference page will be changed too. I know because I got popups offering me to peek to a new "Reference" page. So, until that happen, I will not update scripts, because both pages will share the same code again, and it will be easier to change.
--- End quote ---
Hello to all. As I already said in March, now we all know that this happened. I was busy meanwhile and had no time to deal with it. There are changes across many imdb pages, but reference page is the culprit. I will need couple of months to fix it, since you all know that I am not a programer, and I have to remind my self about everything, especially about special cases. For now, you can pull up significant portion of data without reference page (unfortunately, not the whole cast). To do that and if you are using my scripts, open Script configurator, uncheck to download Reference page and PVD will restart. Then, in "Set Overwrite options...", check all the data you would want to download (Studio, etc..) and restart PVD. Then run the script and this would be what you can get at the moment.
After March, I had some minor adjustments to the scripts and started to work on a Reference page, so I'm uploading them so you could get the same amount data as me. Backup your existing scripts, then overwrite them with these, all to "Scripts" folder. Reminder: these scripts are just starting point to fix them, but they should get you more data comparing to March scripts could get you now, so please do not ask for the support for these scripts. I know they don't fully work.
What should be promising for you is that I'm not planning to abandon using PVD, so I will for sure fix the scripts at some point, so please be patient: if long time no see me, that just means I also haven't fixed the scripts, and I'm working on them. Meanwhile, just add your movies to PVD and later you will update with full data. That is exactly what I've been doing recently.
Best regards
Ivek23:
IMDB_Movie_[EN][Selenium]-v4.psf
Between lines 138 and 139 is this:
--- Code: --- GET_FULL_CONNECTIONS = False ; //To call Function ParsePage_IMDBMovieCONNECTIONS. Not used for parsing, since it is enough to choose both SIMPLE and COMPLEX connections. --> to "True".
--- End code ---
Between lines 7992 and 7993 is this:
--- Code: --- If GET_FULL_CONNECTIONS Then
Begin
--- End code ---
However, when you run the ** SeleniumPVDbScriptsConfig v4 ** script in PVD and uncheck all Connections settings and then restart PVD, the following happens.
IMDB_Movie_[EN][Selenium]-v4.psf does not work.
The following parts of the code are missing.
Between lines 138 and 139 is missing:
--- Code: --- GET_FULL_CONNECTIONS = False ; //To call Function ParsePage_IMDBMovieCONNECTIONS. Not used for parsing, since it is enough to choose both SIMPLE and COMPLEX connections. --> to "True".
--- End code ---
However, between lines 7992 and 7993, this
--- Code: ---[code] If GET_FULL_CONNECTIONS Then
Begin
--- End code ---
[/code]
changes to this:
--- Code: --- If GET_FULL_CONNECTIONS = False ;
--- End code ---
Add the following code to the script
--- Code: ---//(*
function CustomStringReplace(const Source: string; const OldPattern: array of string; const NewPattern: array of string): string;
var
i: Integer;
ResultString: string;
begin
ResultString := Source;
for i := Low(OldPattern) to High(OldPattern) do
begin
ResultString := StringReplace(ResultString, OldPattern[i], NewPattern[i], True, False, True);
end;
Result := ResultString;
end;
//*)
--- End code ---
and then you can add the following code to the Metascore code.
--- Code: --- ItemValue := CustomStringReplace(ItemValue, ['0</', '1</', '2</', '3</', '4</', '5</', '6</', '7</', '8</', '9</'], [',0', ',1', ',2', ',3', ',4', ',5', ',6', ',7', ',8', ',9']);
//ItemValue := StringReplace(ItemValue, '0</', '.0', True, False, True);
//ItemValue := StringReplace(ItemValue, '1</', '.1', True, False, True);
//ItemValue := StringReplace(ItemValue, '2</', '.2', True, False, True);
//ItemValue := StringReplace(ItemValue, '3</', '.3', True, False, True);
//ItemValue := StringReplace(ItemValue, '4</', '.4', True, False, True);
//ItemValue := StringReplace(ItemValue, '5</', '.5', True, False, True);
//ItemValue := StringReplace(ItemValue, '6</', '.6', True, False, True);
//ItemValue := StringReplace(ItemValue, '7</', '.7', True, False, True);
//ItemValue := StringReplace(ItemValue, '8</', '.8', True, False, True);
//ItemValue := StringReplace(ItemValue, '9</', '.9', True, False, True);
--- End code ---
The same can be done with this.
--- Code: --- //Date ~Updated~ (choose simple or verbose version)
Date := DateToStr(CurrentDateTime);
//AddFieldValueXML('viewdate', Date); //Only date, don't admit time-. Set Seen value at the same time.
//AddFieldValueXML('moddate', Date + ' ' + TimeToStr(CurrentDateTime)); //Block the dB saving
ExplodeString(Date, DateParts, '-');
Date:=DateParts[2]+'.'+ DateParts[1]+'.'+DateParts[0];
Date := CustomStringReplace(Date, ['01.', '02.', '03.', '04.', '05.', '06.', '07.', '08.', '09.'], ['1.', '2.', '3.', '4.', '5.', '6.', '7.', '8.', '9.']);
// Date := StringReplace(Date, '01.', '1.', True, True, False);
//Date := StringReplace(Date, '02.', '2.', True, True, False);
//Date := StringReplace(Date, '03.', '3.', True, True, False);
//Date := StringReplace(Date, '04.', '4.', True, True, False);
//Date := StringReplace(Date, '05.', '5.', True, True, False);
//Date := StringReplace(Date, '06.', '6.', True, True, False);
//Date := StringReplace(Date, '07.', '7.', True, True, False);
//Date := StringReplace(Date, '08.', '8.', True, True, False);
//Date := StringReplace(Date, '09.', '9.', True, True, False);
//AddCustomFieldValueByName('Updated', Date); // (Left for FA Script)
//AddCustomFieldValueByName('Updated0', Date + ' at ' + TimeToStr(CurrentDateTime)); // Saved for RottenTomatoes
AddCustomFieldValueByName('IUpdated', Date + ' at ' + TimeToStr(CurrentDateTime) + ' • ' + SCRIPT_FILE_NAME + ' ' + SCRIPT_VERSION); // Annoying
LogMessage('Function ParsePage - Provider data info retreived Ok in ' + DateToStr(CurrentDateTime) + ' ' + TimeToStr(CurrentDateTime) + '| (~Updated~)');
Mode := smFinished;
LogMessage('Function ParsePage smNormal END====================== |');
Exit;
End;
--- End code ---
Ivek23:
You need the latest chromedriver.exe, otherwise it won't work.
And this tip.
For the Episode List page, it would be necessary and even better if a script was made specifically for it.
afrocuban:
--- Quote from: Ivek23 on October 21, 2025, 07:36:21 am ---
For the Episode List page, it would be necessary and even better if a script was made specifically for it.
--- End quote ---
Episode list works totally fine for me, even now. It would be probably impossible for me to create new script. We can look at it like this: Episode list has it's own script: it's Selenium script "Selenium_Chrome_IMDB_Episode_List_page_v4.py" which produces txt file with all episodes, and .psf script just scrapes that txt file, so I am not sure what we could achieve with additional psf script whose purpose would be only to scrape txt file.
Anyway, I have corrected FilmAffinity script, and made some improvements in IMDb Movie scripts (for example, storyline section dynamic load scraping is fixed). I have improved FilmAffinity script speed enormously! In order this script to work properly and fast you need:
1. To install python 3.12+
2. in a cmd to install psutil with
--- Quote ---pip install psutil
--- End quote ---
in order to hopefully prevent selenium hangups when html elements aren't found on the page.
3. To download and overwrite scripts I'm uploading in this post.
4. In a script configurator to deselect Reference page. PVD will restart. Then select "Studio" and "Description" and all others you want and do not restart PVD. Try to import data, and now you should get director, cast, tagline and some other original and related custom fields scraped from the Main page. If you don't get cast, tagline and director, restart PVD manually and try again to import. I am not sure about this second restart, so try both. One will work for sure.
I will not provide support for these scripts until I finish, because I know they still don't fully work. I just want to share with you same amount of data I'm getting at the moment when some significant improvement is done. In a pictures you can get the sense of what i'm getting now with IMDB script.
Once I finish IMDb script we will test and correct it together.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version