Recent Posts

Pages: 1 ... 4 5 6 7 8 [9] 10
81
PVD Python Scripts / Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Last post by Ivek23 on March 21, 2025, 07:13:42 pm »
Function ParsePage_IMDBMovieBASE

Improved part of the code
Quote
      //Get ~IMDb Url~
      MovieURL := TextBetWeenFirst(ItemList, '","url":"','","name":"');
      MovieURL := StringReplace(MovieURL, 'https://' ,'http://' ,True, False, True);
      AddFieldValueXML('url', MovieURL);
      LogMessage('Function ParsePage_IMDBMovieBASE -  *  Get result MovieURL: ' + MovieURL);
      // IMDB_FIELD         = 'IMDB';
       if PosFrom('imdb', MovieURL, 1) > 0 then
      AddCustomFieldValueByName(IMDB_FIELD, '-1');


   
Quote
      If Not (ReferencePageDownloaded) Then Begin
         // Get ~title~
         titleValue := TextBetWeenFirst(ItemList, '","name":"', '","'); // Strings which opens/closes the data. WEB_SPECIFIC
         If titleValue = '0' then titleValue := '';
         // If titleValue = '' then titleValue := TextBetWeenFirst(ItemList, '<h1 class="long">', '<'); // Strings which opens/closes the data. WEB_SPECIFIC
         //if GET_ORIGINAL_TITLE then - If set to false, both with GET_LOCAL_TITLE, nothing will be added, so it doesn't make sense here. However, in REFERENCE, as the third option, we can set the title available from the IMDb page for users with English settings (on IMDb or computer Regional Settings) or those in English-speaking geo-locations.
         AddFieldValueXML('title', titleValue);
         AddCustomFieldValueByName('Title', titleValue);
         AddCustomFieldValueByName('Localized title', titleValue);
         LogMessage('Function ParsePage_IMDBMovieBASE - Get result title: ' + titleValue + ' | |');

      //If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[2] = '0')) Then Begin
         // Get ~origtitle~
         ItemValue := TextBetWeenFirst(ItemList, '","name":"', '","'); // Strings which opens/closes the data. WEB_SPECIFIC
         If (Length(ItemValue)=0) Then ItemValue := titleValue; // Provider hides the original title if same that title. WEB_SPECIFIC
         AddFieldValueXML('origtitle', ItemValue);
         AddCustomFieldValueByName('Origtitle', ItemValue);
         AddCustomFieldValueByName('Original Title', ItemValue);
         LogMessage('Function ParsePage_IMDBMovieBASE - Get result origtitle + (CF~OrigTitle~): ' + ItemValue + ' | |');
      //End;

Improved part of the code

Quote
      If Not (ReferencePageDownloaded) Then Begin
         // Get ~title~
         titleValue := TextBetWeenFirst(ItemList, '","name":"', '","'); // Strings which opens/closes the data. WEB_SPECIFIC
         If titleValue = '0' then titleValue := '';
         //if GET_ORIGINAL_TITLE then - If set to false, both with GET_LOCAL_TITLE, nothing will be added, so it doesn't make sense here. However, in REFERENCE, as the third option, we can set the title available from the IMDb page for users with English settings (on IMDb or computer Regional Settings) or those in English-speaking geo-locations.
         AddFieldValueXML('title', titleValue);
         AddCustomFieldValueByName('Title', titleValue);
         AddCustomFieldValueByName('Localized title', titleValue);
         LogMessage('Function ParsePage_IMDBMovieBASE - Get result title: ' + titleValue + ' | |');

      //If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[2] = '0')) Then Begin
         // Get ~origtitle~
         ItemValue := TextBetWeenFirst(ItemList, '","name":"', '","'); // Strings which opens/closes the data. WEB_SPECIFIC
         If (Length(ItemValue)=0) Then ItemValue := titleValue; // Provider hides the original title if same that title. WEB_SPECIFIC
         AddFieldValueXML('origtitle', ItemValue);
         AddCustomFieldValueByName('Origtitle', ItemValue);
         AddCustomFieldValueByName('Original Title', ItemValue);
         LogMessage('Function ParsePage_IMDBMovieBASE - Get result origtitle + (CF~OrigTitle~): ' + ItemValue + ' | |');
      //End;


   

Quote
//If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[18] = '0')) Then Begin
            // Get ~rdate~ + (CF~IMDB Release Date~)
            ItemValue := TextBetWeenFirst(ItemList, ',"datePublished":"', '","'); // Strings which opens/closes the data. WEB_SPECIFIC
            AddFieldValueXML('rdate', ItemValue); // It has to be added here, because being original field it follows by design the regional settings of your computer and cannot be customized like IMDB Release Date(s). It can be added as ItemArray[2] + '.' + ItemArray[1] + '.' + ItemArray[0]; only if the formats in the HTML and your computer are identical.
            LogMessage('Function ParsePage_IMDBMovieBASE - Get result ~rdate~: ' + ItemValue + ' | |');
            ItemValue := StringReplace(ItemValue, '-01', '-1', True, False, True);
            ItemValue := StringReplace(ItemValue, '-02', '-2', True, False, True);
            ItemValue := StringReplace(ItemValue, '-03', '-3', True, False, True);
            ItemValue := StringReplace(ItemValue, '-04', '-4', True, False, True);
            ItemValue := StringReplace(ItemValue, '-05', '-5', True, False, True);
            ItemValue := StringReplace(ItemValue, '-06', '-6', True, False, True);
            ItemValue := StringReplace(ItemValue, '-07', '-7', True, False, True);
            ItemValue := StringReplace(ItemValue, '-08', '-8', True, False, True);
            ItemValue := StringReplace(ItemValue, '-09', '-9', True, False, True);
            if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE - Get result ReleaseDatePublished: ' + ItemValue + ' | |');
            if ItemValue <> '' then begin
               ExplodeString(ItemValue, ItemArray, '-');
               ItemValue := ItemArray[2] + '.' + ItemArray[1] + '.' + ItemArray[0];
               AddCustomFieldValueByName('IMDB Release Date', ItemValue);
               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE - Get result DatePublished (CF~IMDB Release Date~): ' + ItemValue + ' | |');
            //End;
         End;
      End;   //If Not (ReferencePageDownloaded) then Begin should and here

Improved part of the code for the CustomStringReplace function, thus obtaining better space in scripts.

Quote
         //If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[18] = '0')) Then Begin
            // Get ~rdate~ + (CF~IMDB Release Date~)
            ItemValue := TextBetWeenFirst(ItemList, ',"datePublished":"', '","'); // Strings which opens/closes the data. WEB_SPECIFIC
            AddFieldValueXML('rdate', ItemValue); // It has to be added here, because being original field it follows by design the regional settings of your computer and cannot be customized like IMDB Release Date(s). It can be added as ItemArray[2] + '.' + ItemArray[1] + '.' + ItemArray[0]; only if the formats in the HTML and your computer are identical.
            LogMessage('Function ParsePage_IMDBMovieBASE - Get result ~rdate~: ' + ItemValue + ' | |');
            ItemValue := CustomStringReplace(ItemValue, ['-01', '-02', '-03', '-04', '-05', '-06', '-07', '-08', '-09'], ['-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9']);
            if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE - Get result ReleaseDatePublished: ' + ItemValue + ' | |');
            if ItemValue <> '' then begin
               ExplodeString(ItemValue, ItemArray, '-');
               ItemValue := ItemArray[2] + '.' + ItemArray[1] + '.' + ItemArray[0];
               AddFieldValueXML('rdate',ItemValue);
               AddCustomFieldValueByName('IMDB Release Date', ItemValue);
               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE - Get result DatePublished (CF~IMDB Release Date~): ' + ItemValue + ' | |');
            //End;
         End;
      End;   //If Not (ReferencePageDownloaded) then Begin should and here



More to come next time or tomorrow.

82
PVD Python Scripts / Re: Selenium Imdb Series and Episodes Scripts discussion
« Last post by Ivek23 on March 21, 2025, 05:56:24 pm »
Question:
Which script creates seasons in PVD?

Imdb Movie(episodelist) [HTTPS] script or Imdb Movie(episodelist) [HTTPS] x number and sea tag before the word script.
83
PVD Python Scripts / Re: Selenium Imdb Series and Episodes Scripts discussion
« Last post by afrocuban on March 21, 2025, 01:35:44 pm »
Question:
Which script creates seasons in PVD?
84
PVD Python Scripts / Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Last post by Ivek23 on March 21, 2025, 11:40:39 am »
We will custom fields, which are duplicates and if necessary, duplicate custom fields will be removed because they contain similar information, but we will go step by step. Testing is needed to see how and what.
85
PVD Python Scripts / Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
« Last post by afrocuban on March 21, 2025, 08:27:17 am »
For my personal use, I will disable all the duplicates of the custom fields once I set all the scripts. We were foolish we were allowed to ask to have like 6 custom fields for Aspect ratio, for example. I just brought them all so users can decide which one they want. If some are empty, it's either they don't exist for the given movie, or they are set by Configurator not to be brought. Logic of the script is extremely complex. But let's see.
86
PVD Python Scripts / Re: Chrome Selenium v4 of Movie and People scripts progress
« Last post by Ivek23 on March 21, 2025, 07:32:11 am »
Thanks, Ivek. As usual, if you could be more specific, it would be helpful.

More details in the new PVD Selenium MOD v4 IMDb Movie Script Confusion topic at the link below.

https://www.videodb.info/forum_en/index.php/topic,4385.msg22851.html#msg22851
87
PVD Python Scripts / Re: Chrome Selenium v4 of Movie and People scripts progress
« Last post by Ivek23 on March 21, 2025, 07:29:42 am »
While we are waiting Ivek to decide if I will continue to share my script, I have integrated Series script into Movie Script and upgraded search with the coundtdown for the default "general" search. In the screenshoot you can see search window option, as well as series imported with movie script

Make no mistake, you have put a lot of effort into the scripts to make them work with Selenium scripts and make PVD more usable again for its users. This also means that you will continue to share your script with other PVD users in the future. However, it is necessary to edit the custom fields in the script a little so that they are in the right places and visible in them. information.

Regarding the search results, this is a great thing, that it still only searches for those titles that you currently need for the movie or series and so on.
88
PVD Python Scripts / Re: Chrome Selenium v4 of Movie and People scripts progress
« Last post by afrocuban on March 21, 2025, 12:07:29 am »
While we are waiting Ivek to decide if I will continue to share my script, I have integrated Series script into Movie Script and upgraded search with the coundtdown for the default "general" search. In the screenshoot you can see search window option, as well as series imported with movie script
89
PVD Python Scripts / Re: Chrome Selenium v4 of Movie and People scripts progress
« Last post by afrocuban on March 20, 2025, 11:17:27 pm »
Thanks, Ivek. As usual, if you could be more specific, it would be helpful.
90
PVD Python Scripts / PVD Selenium MOD v4 IMDb Movie Script Confusion
« Last post by Ivek23 on March 20, 2025, 03:05:14 pm »
I do not recommend this, because for series there should be one script and for movies another script. I especially do not recommend this, because there is already quite a bit of confusion and errors in the movie scripts, because certain parts of the code either do not transfer any information to you. And if they do transfer information. they have errors or transfer incorrect information.

And that's it.
Many custom fields have been added that do not belong to certain parts of the code and then remain empty or have incorrect information in them or these fields are duplicated and therefore do not transfer any information in them. Therefore, it will be necessary to examine the IMDB Movie script in detail, where there is the most confusion.
Pages: 1 ... 4 5 6 7 8 [9] 10
anything