Recent Posts

Pages: 1 2 3 [4] 5 6 7 8 9 10
31
I have optimized Selenium_Chrome_Base_page_v4.py script so now downloading of the IMDb main page should be dramatically faster - around 18 seconds on my computer.

The Selenium_Chrome_Base_page_v4.py script works fine. However, it doesn't work at all with Firefox and Geckodriver options.

The Selenium_Chrome_Base_page_v4.py script, which was before the latest update, works on Firefox and Geckodriver options.
32
Great. I have fixed Movie Connections, and full AKA. Also fixed Selenium_Chrome_Movie_Additional_pages_v4.py so now it clicks on "See more" and similar objects, again. I will not upload next iterations because I want to fix whole Base page function first, and  for me it looks that IMDb makes it harder and harder to scrape data, since for now, I'm often seeing errors IMDb killing connections to host when loading additional pages with selenium, so I have to investigate selenium and python options to mimic human browsing as best as possible.

If you still want to have current versions of my scripts, let me know so I could upload them with the manual how to get data I'm getting at the moment.
33
I have optimized Selenium_Chrome_Base_page_v4.py script so now downloading of the IMDb main page should be dramatically faster - around 18 seconds on my computer.

The Selenium_Chrome_Base_page_v4.py script works fine. However, it doesn't work at all with Firefox and Geckodriver options.

Changed the path for Geckodriver in Selenium_Chrome_Base_page_v4.py for Firefox script in 7.z file.
34
I have optimized Selenium_Chrome_Base_page_v4.py script so now downloading of the IMDb main page should be dramatically faster - around 18 seconds on my computer.
35

For the Episode List page, it would be necessary and even better if a script was made specifically for it.


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.

We'll see how it works now. Before these fixes, there was a problem with the Episode List code for the movie title and the PVD froze, but if the code in the script was blocked and the episode field was unchecked, it worked without any problems.
36

For the Episode List page, it would be necessary and even better if a script was made specifically for it.


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
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.
37
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.
38
IMDB_Movie_[EN][Selenium]-v4.psf

Between lines 138 and 139 is this:
Code: [Select]
  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".
Between lines 7992 and 7993 is this:
Code: [Select]
If GET_FULL_CONNECTIONS Then
Begin


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: [Select]
  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".
However, between lines 7992 and 7993, this
Code: [Select]
[code] If GET_FULL_CONNECTIONS Then
Begin
[/code]

changes to this:
Code: [Select]
If GET_FULL_CONNECTIONS  = False ;


Add the following code to the script
Code: [Select]
//(*
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; 
//*)

and then you can add the following code to the Metascore code.
Code: [Select]
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);

The same can be done with this.
Code: [Select]
    //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;
39
Support / Re: IMDb
« Last post by Ivek23 on October 20, 2025, 06:44:53 am »
Python (+Selenium) scripts and PVD Selenium MOD IMDb Movie, People and FilmAffinity Scripts.

PVD Selenium MOD IMDb Movie, People and FilmAffinity Scripts only when or if an Afrocuban user comes back and updates them and they can be used again.

The Afrocuban user will probably not return. A few days ago I sent an email to his email address, which is listed in his profile, but so far I have not received any response that the message was received at his email. We will see what happens.

Good news.

afrocuban user is back.

More information on when and how the new versions of PVD Selenium MOD for IMDb Movie, People and FilmAffinity Scripts will be released can be found at the link below.

https://www.videodb.info/forum_en/index.php/topic,4379.msg22977.html#msg22977
40
Scripts and Templates / Re: Export template: HTML List (English + German)
« Last post by afrocuban on October 19, 2025, 02:40:46 pm »
Hello to all of you,

I haven't been here for a long time. Work and especially family have completely taken over. But I'm still using PVD myself and it's nice to see there is still at least some life in here. Big thanks to Ivek23, I think. It is a great pity that Nostra has put PVD on ice. I really hope he is doing well despite all the current upheavals in the world and that his reasons behind his absence are of a similarly positive nature as those for mine...

Some time ago, I've noticed that large parts of the JavaScript in the HTML frames export template no longer work (at least if exported files are local and not hosted on a domain). The reason is the "same origin policy" that became general standard and that browsers may treat all file:/// URIs as unique origins. In this case, JavaScript in iFrames is no longer allowed to directly access parts of their parents and vice versa. In the exported database, this affects filters, the search function and most of the extras added by pimpHTMLframesExport.exe (which can be found in the subfolder \pimpHTMLframesExport after the export). I fixed this, but tested only in Firefox. The new export templates are attached.

All the kindest wishes to those still here!

Thanks svenne. It's allways great to hear family takes first pace. Updated template works flawlessly. I wanted to ask you if you're willing to help with lastDino's template too, if that is viable for you. Thank you in advance!
Pages: 1 2 3 [4] 5 6 7 8 9 10