Author Topic: PVD Selenium MOD v4 IMDb Movie Script Confusion  (Read 2093 times)

0 Members and 2 Guests are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2834
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Reply #20 on: March 31, 2025, 11:35:38 am »

Function ParsePage(HTML: String;URL:AnsiString):Cardinal;   //BlockOpen

Minor code correction.

Quote
   
       //Get ~url~
        if (0=Pos(BASE_URL_PRE, StoredURL)) then begin   //Write the url if doesn't exist
            AddFieldValueXML('url', StringReplace(DownloadURL, BASE_URL_PRE_TRUE, BASE_URL_PRE, True, False, False));
            LogMessage('Function ParsePage -      Get result ~url~: ' + StringReplace(DownloadURL, BASE_URL_PRE_TRUE, BASE_URL_PRE, True, False, False) + ' | |');
        end;
      
        //Get ~IMDb Movie Url~ (CF~IMDb.com~) and (CF~WaybackArchive IMDb URLs~)
        Movie_URL := StringReplace(DownloadURL, BASE_URL_PRE_TRUE, BASE_URL_PRE, True, False, False);
      LogMessage('Function ParsePage -      Get result Movie_url: ' + Movie_URL + ' | |');
      
      AddCustomFieldValueByName('IMDb.com', '<link url="' + Movie_URL + '">IMDb.com</link>');
      
      AddCustomFieldValueByName('WaybackArchive IMDb URLs', '<link url="https://web.archive.org/web/*/' + Movie_URL + '*">*IMDb.com*</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'business">Busines</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'combined">Combined</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'fullcredits">Full Cast&Crew</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'awards">Awards</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'releaseinfo">ReleaseDates</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'technical">TechSpecs</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'parentalguide">ParentsGuide</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'keywords">PlotKeywords</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'plotsummary">PlotSummary</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'taglines">Taglines</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'movieconnections">Connections</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'soundtrack">Soundtracks</link>  <link url="https://web.archive.org/web/*/' + Movie_URL + 'externalsites">MiscSites</link>');
            
      Fullinfo1 := '';
      Fullinfo1 := Fullinfo1 + '<link url="http://www.boxofficemojo.com/title/' + MovieID + '">BoxOfficeMojo</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="http://en.wikipedia.org/w/index.php?search=' + GetFieldValue(2) + '">Wikipedia</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dmovies-tv&field-keywords=' + GetFieldValue(2) + '">AmazonSearch</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dmovies-tv&field-keywords=' + GetFieldValue(2) + '%20' + GetFieldValue(5) + '">AmazonSearch1</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="https://www.allmovie.com/search/movies/' + GetFieldValue(2) + '">AllMovieSearch</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="https://www.themoviedb.org/search?query=' + GetFieldValue(2) + '">TMDBSearch</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="https://www.rottentomatoes.com/search/?search=' + GetFieldValue(2) + '">RottenTomatoesSearch</link>  ';
      Fullinfo1 := Fullinfo1 + '<link url="https://www.thetvdb.com/search?query=' + GetFieldValue(2) + '">TVDB Search</link>  ';
      If Fullinfo1 <> '' then Fullinfo1 := Fullinfo1;
      If Fullinfo1 <> '' then AddCustomFieldValueByName('IMDbMovieLinksInfo', Fullinfo1);
            
      AddCustomFieldValueByName('IMDbSearchUrl', '<link url="http://www.imdb.com/find/?s=tt&q=' + StringReplace(GetFieldValueXML('title'), ' ', ' + ', True, True, False) + '">**Search IMDb**</link>  <link url="https://www.imdb.com/search/title?title=' + StringReplace(GetFieldValueXML('title'), ' ', ' + ', True, True, False) + '">Search IMDb</link>  ');
      
      AddCustomFieldValueByName('IMDbMoviesUrl', '<link url="' + Movie_URL + '">IMDb MovieUrl</link>  <link url="https://www.boxofficemojo.com/title/' + MovieID + '/">Box Office Mojo</link>  <link url="http://www.omdbapi.com/">OMDb API info</link>  <link url="http://www.omdbapi.com/apikey.aspx">OMDb API Key</link>');
      
      //AddCustomFieldValueByName('OMDbAPIUrl', '<link url="' + Movie_URL + '">IMDb MovieUrl</link>  <link url="http://www.omdbapi.com/?i=' + MovieID + '&apikey=[yourkey]&plot=short&tomatoes=true">OMDb API info for IMDb</link>  <link url="http://www.omdbapi.com/?i=' + MovieID + '&apikey=[yourkey]&plot=full&tomatoes=true">OMDb API full info for IMDb</link>  <link url="http://www.omdbapi.com/?i=' + MovieID + '&apikey=[yourkey]&plot=full&r=xml&tomatoes=true">OMDb API full xml info for IMDb</link>  <link url="http://www.omdbapi.com/?s=' + GetFieldValueXML('title') + '&apikey=[yourkey]&plot=short&tomatoes=true">OMDb API Search for IMDb</link>');
      //LogMessage('Function ParsePage -      Get result OMDb API info_URL: ' + #13 + '<link url="http://www.omdbapi.com/">OMDb API info</link>  <link url="http://www.omdbapi.com/apikey.aspx">OMDb API Key</link>' + ' | |');
            
      //(*
        Fullinfo := '';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + '">MainPage</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'reference">Reference</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'fullcredits">Full Cast&Crew</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'awards">Awards</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'releaseinfo">ReleaseDates</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'technical">TechSpecs</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'parentalguide">ParentsGuide</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'keywords">PlotKeywords</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'plotsummary">PlotSummary</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'locations">FilmLocations</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'taglines">Taglines</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'companycredits">CompanyCredits</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'movieconnections">Connections</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'soundtrack">Soundtracks</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'externalsites">MiscSites</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'externalsites#photos">MiscPhoto</link>  ';
        Fullinfo := Fullinfo + '<link url="' + Movie_URL + 'mediaindex">PhotoGallery</link>  ';
      Fullinfo := Fullinfo + '<link url="http://www.imdb.com/chart/top">IMDb Top 250</link>  ';
      Fullinfo := Fullinfo + '<link url="http://www.imdb.com/chart/bottom">Lowest Rated</link>  ';
      Fullinfo := Fullinfo + '<link url="http://www.imdb.com/chart/toptv">Top 250 TV</link>  ';
      Fullinfo := Fullinfo + '<link url="https://www.imdb.com/search/title?title=' + StringReplace(GetFieldValueXML('title') + '&title_type=feature&view=simple&count=250', ' ', ' + ', True, True, False) + '">Search IMDb</link>  ';
      Fullinfo := Fullinfo + '<link url="http://www.imdb.com/find?s=tt&q=' + StringReplace(GetFieldValueXML('title'), ' ', ' + ', True, True, False) + '">**Search IMDb**</link>  ';
      If Fullinfo <> '' then IMDB_URL := Fullinfo;
      If IMDB_URL <> '' then AddCustomFieldValueByName('CompE', IMDB_URL);
        If IMDB_URL <> '' then AddCustomFieldValueByName('IMDb_Movies_ Urls', IMDB_URL);
        //LogMessage('Function ParsePage -      Get result Fullinfo-IMDB_URL (CF~CompE~ ): ' + #13 + IMDB_URL + ' | |')
      //*)
Quote
    //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.']);
        //AddCustomFieldValueByName('Updated', Date); // Simple
        //AddCustomFieldValueByName('Updated0', Date + ' at ' + TimeToStr(CurrentDateTime)); // Verbose
        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;
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: 2834
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Reply #21 on: April 09, 2025, 12:54:42 pm »
Here is an updated, modified and adapted IMDB_Movies_[EN][Selenium]-v4.psf , where only one custom field is used in certain parts of the code, rather than multiple duplicated custom fields, which then do not transfer the correct information or, possibly, do not transfer any information at all. However, some parts of the code or redundant parts of the code log files are blocked, because they are not used at all and only unnecessarily increase the size of the script. However, parts of the code are unblocked and should be, because they only slow down the script and a pop-up window appears with the Too many faulty attempts to internet connection notification

Below is the attachment.
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: 73
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Reply #22 on: April 19, 2025, 05:07:33 pm »
Here is an updated, modified and adapted IMDB_Movies_[EN][Selenium]-v4.psf , where only one custom field is used in certain parts of the code, rather than multiple duplicated custom fields, which then do not transfer the correct information or, possibly, do not transfer any information at all. However, some parts of the code or redundant parts of the code log files are blocked, because they are not used at all and only unnecessarily increase the size of the script. However, parts of the code are unblocked and should be, because they only slow down the script and a pop-up window appears with the Too many faulty attempts to internet connection notification

Below is the attachment.


Is it possible to compile a complete package of scripts? So that an inexperienced user does not have to suffer during the compilation

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2834
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Reply #23 on: April 19, 2025, 05:55:01 pm »
There is a PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity topic on this link below, where the Scripts.7z package is a file with all the missing files in the package. Below is also the Scripts-2025-03-23.7z package with updates. Use only those files that you are missing. If you want, you can edit the SeleniumPVDbScriptsConfig-v4.ini file if you want to use more scripts.

https://www.videodb.info/forum_en/index.php/topic,4379.msg22821.html#msg22821
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: 73
    • View Profile
Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Reply #24 on: April 27, 2025, 10:46:25 am »
There is a PVD Selenium MOD v4 IMDb Movie, People and FilmAffinity topic on this link below, where the Scripts.7z package is a file with all the missing files in the package. Below is also the Scripts-2025-03-23.7z package with updates. Use only those files that you are missing. If you want, you can edit the SeleniumPVDbScriptsConfig-v4.ini file if you want to use more scripts.

https://www.videodb.info/forum_en/index.php/topic,4379.msg22821.html#msg22821

downloaded and installed. Now it gives me this message. I can edit it myself only if someone shows me what needs to be done. It is important and sufficient for me to download the basic information about the film. The one that was previously filled in by default. Therefore, the question is - what scripts and where to enter in the ".ini" file to get this information.
« Last Edit: April 27, 2025, 12:16:02 pm by Pacifist »

 

anything