Personal Video Database

English => Development => PVD Python Scripts => Topic started by: Ivek23 on March 20, 2025, 03:05:14 pm

Title: PVD Selenium MOD v4 IMDb Movie Script Confusion
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.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
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.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
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.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
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.

Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: afrocuban on March 21, 2025, 09:50:34 pm
Thanks Ivek.


here's the assesment of these 3 snippets:


The only thing from the first 2 snippets  I see is that commented out lines are deleted from the original. I compared everything in Notepad++:

Quote
      //MovieURL := 'http://www.imdb.com (http://www.imdb.com)' + TextBetWeenFirst(ItemList, '", "url":"', '", "name":"');
Quote
      //LogMessage('Function ParsePage_IMDBMovieBASE -   *   Get result url 1: ' + MovieURL + ' | |');

Quote
         // If titleValue = '' then titleValue := TextBetWeenFirst(ItemList, '<h1 class="long">', '<'); // Strings which opens/closes the data. WEB_SPECIFIC



These lines, which were already commented out, are just deleted as "improvement" but they don't influence anything anyway, so I am not sure what improvement is there? With or without them, everything works anyway.

Also, the third snippets works too, it's just the other way to achieve the same. There are so many ways to achieve the same goal, and I choose one, that works too.

I hope to see what doesn't work actually in the scripts.


Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 22, 2025, 06:25:24 am
We'll get to that, I'm currently checking that part of the code isn't working and I'm working on a fix. I'll post the fix later today.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 28, 2025, 06:26:56 am
Notice:

These two Function ConfDate1 and Function ConfDate2 below are not used in the script because if there is no complete date (day, month, year) or if the day or month is missing, PVD will freeze.


Quote
Function ConfDate1(OrigDate:String): String; //BlockOpen
Var
   i, rNum:Integer;
   d, m, y: String;
   TabMonths, TabFullMonths:Array of string;
   TabDate:TwideArray;
begin
   TabMonths := ['Null', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
   TabFullMonths := ['Null', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
   rNum := ExplodeString(OrigDate, TabDate, '/');
   // LogMessage('* Function ConfDate1 => rNum: ' + IntToStr(rNum));
   if (rNum <= 1) then begin
      rNum := ExplodeString(OrigDate, TabDate, ' ');
      // LogMessage('* Function ConfDate1 => rNum: ' + IntToStr(rNum));
   end;
   if (rNum > 0) then begin
      // LogMessage('** Function ConfDate1 => TabDate 0: ' + TabDate[0]);
      // LogMessage('** Function ConfDate1 => TabDate 1: ' + TabDate[1]);
      // LogMessage('** Function ConfDate1 => TabDate 2: ' + TabDate[2]);
      if (Length(TabDate[0]) > 0) then begin
         if (Length(TabDate[0]) > 2) then begin
            m := TabDate[0];
            for i := 1 to 12 do begin
               if ((m = TabMonths) or (m = TabFullMonths)) then begin
                  m := IntToStr(i);
                  break;
               end;
            end;
            LogMessage('* Function ConfDate1 => Months: ' + m);
            // d := Copy(TabDate[1], 1, Length(TabDate[1])-1);
            d := TabDate[1];
            If Copy(TabDate[1], 1, 1) = '0' then
               d:= Copy(TabDate[1], 2, 1);
            y := TabDate[2];
         end else if (Length(TabDate[1]) > 0) then begin
            y:= TabDate[2];
            m:= TabDate[1];
               For i := 1 to 12 do begin
                  If ((m = TabMonths) or (m = TabFullMonths)) then begin
                     m := IntToStr(i);
                     break;
                  end;
               end;
            d:= TabDate[0];
            If Copy(TabDate[0], 1, 1) = '0' then
               d:= Copy(TabDate[0], 2, 1);
            LogMessage('* Function ConfDate1 => Year: ' + y + ' month: ' + m + ' day: ' + d);
         end else begin
            y := '';
            m := '';
            d := '';
         end;
      end else begin
         ExplodeString(OrigDate, TabDate, '/');
         y := Copy(OrigDate, 7, 4);
         m := Copy(OrigDate, 3, 3);
            For i := 1 to 12 do begin
               If m = Copy(TabMonths, 1, 3) then begin
                  m := IntToStr(i);
                  break;
               end;
            end;
         d := Copy(OrigDate, 1, 2);
            If Copy(TabDate[0], 1, Length(TabDate[0])-1) = '0' then d:= Copy(TabDate[0], 2, Length(TabDate[0])-1);
         LogMessage('* Function ConfDate1 - Year: ' + y + ' month: ' + m + ' day: ' + d);
      end;
      Result := d + '.' + m + '.' + y;
   end;
End; //BlockClose

Function ConfDate2(OrigDate:String): String; //BlockOpen
Var
    i, rNum:Integer;
    d, m, y: String;
    TabMonths, TabFullMonths:Array of string;
    TabDate:TwideArray;
begin
    TabMonths := ['Null', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
    TabFullMonths := ['Null', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
    rNum := ExplodeString(OrigDate, TabDate, '/');
    // LogMessage('* Function ConfDate2 => rNum: ' + IntToStr(rNum));
    if (rNum <= 1) then begin
        rNum := ExplodeString(OrigDate, TabDate, ' ');
        // LogMessage('* Function ConfDate2 => rNum: ' + IntToStr(rNum));
    end;
    if (rNum > 0) then begin
        // LogMessage('** Function ConfDate2 => TabDate 0: ' + TabDate[0]);
        // LogMessage('** Function ConfDate2 => TabDate 1: ' + TabDate[1]);
        // LogMessage('** Function ConfDate2 => TabDate 2: ' + TabDate[2]);
        if (Length(TabDate[0]) > 0) then begin
            if (Length(TabDate[0]) > 2) then begin
                m := TabDate[0];
                for i := 1 to 12 do begin
                    if ((m = TabMonths) or (m = TabFullMonths)) then begin
                        m := IntToStr(i);
                        break;
                    end;
                end;
                if Length(m) = 1 then m := '0' + m; // Ensure month has two digits
                LogMessage('* Function ConfDate2 => Months: ' + m);
                d := TabDate[1];
                If Copy(TabDate[1], 1, 1) = '0' then
                    d := Copy(TabDate[1], 2, 1);
                if Length(d) = 1 then d := '0' + d; // Ensure day has two digits
                y := TabDate[2];
            end else if (Length(TabDate[1]) > 0) then begin
                y := TabDate[2];
                m := TabDate[1];
                For i := 1 to 12 do begin
                    If ((m = TabMonths) or (m = TabFullMonths)) then begin
                        m := IntToStr(i);
                        break;
                    end;
                end;
                if Length(m) = 1 then m := '0' + m; // Ensure month has two digits
                d := TabDate[0];
                If Copy(TabDate[0], 1, 1) = '0' then
                    d := Copy(TabDate[0], 2, 1);
                if Length(d) = 1 then d := '0' + d; // Ensure day has two digits
                LogMessage('* Function ConfDate2 => Year: ' + y + ' month: ' + m + ' day: ' + d);
            end else begin
                y := '';
                m := '';
                d := '';
            end;
        end else begin
            ExplodeString(OrigDate, TabDate, '/');
            y := Copy(OrigDate, 7, 4);
            m := Copy(OrigDate, 3, 3);
            For i := 1 to 12 do begin
                If m = Copy(TabMonths, 1, 3) then begin
                    m := IntToStr(i);
                    break;
                end;
            end;
            if Length(m) = 1 then m := '0' + m; // Ensure month has two digits
            d := Copy(OrigDate, 1, 2);
            If Copy(TabDate[0], 1, Length(TabDate[0])-1) = '0' then
                d := Copy(TabDate[0], 2, Length(TabDate[0])-1);
            if Length(d) = 1 then d := '0' + d; // Ensure day has two digits
            LogMessage('Function ConfDate2 - Year: ' + y + ' month: ' + m + ' day: ' + d);
        end;
        // Format the date as yyyy-mm-dd
        Result := y + '-' + m + '-' + d;
    end;
End; //BlockClose
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 28, 2025, 01:38:22 pm
Function ParsePage_IMDBMovieBASE

Cleaned part of the code.

Quote
   If Not (ReferencePageDownloaded) Then Begin
   //Get ~IMDB_Votes~
         ItemValue := TextBetWeenFirst(ItemList,'","ratingCount":',',"');   //Strings which opens/closes the data. WEB_SPECIFIC
         AddCustomFieldValueByName('IMDB_Votes', ItemValue);
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result ratingCount (CF~IMDB_Votes~): ' + ItemValue + ' | |');
         
         //Get ~imdbrating~~IMDB Rating~~IMDBRating~
         ItemValue := TextBetWeenFirst(ItemList,'"worstRating":1,"ratingValue":','},"');   //Strings which opens/closes the data. WEB_SPECIFIC
         //ItemValue := FloatToStr((StrToFloat(ItemValue) * 1));
         AddFieldValueXML('imdbrating',ItemValue);
         AddCustomFieldValueByName('IMDB Rating',ItemValue);
         AddCustomFieldValueByName('IMDBRating',ItemValue);
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result ratingValue ~imdbrating~ (CF~IMDB Rating~~IMDBRating~): ' + ItemValue + ' | |');
      End;   //If Not (ReferencePageDownloaded) Then Begin should end here
   End;   //If (Length(ItemList)>0) Then Beginshould end here


Custom field name changes.

Quote
      If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[4] = '0')) Then Begin
         // Go to "Tv Mode"
         // Get ~year~ ~yearsValue~
         StartPos := Pos('<h1 textlength="', HTML);
         if StartPos > 0 then begin
            yearsValue := TextBetWeen(HTML, 'releaseinfo/?ref_=tt_ov_rdat">', '</a></li>', false, StartPos);
            LogMessage('Function ParsePage_IMDBMovieBASE - Get result year (yearsValue): ' + yearsValue + ' | |');
            debug_pos1 := Pos('–', yearsValue);
            if debug_pos1 > 0 then yearsValue := Copy(yearsValue, 0, debug_pos1 - 1);
            AddFieldValueXML('year', yearsValue);
            If Not (ReferencePageDownloaded) Then Begin
            AddCustomFieldValueByName('Imdb_Title_1', titleValue + ' (' + yearsValue + ')');
            end else
            if yearsValue <> '' Then LogMessage('Function ParsePage_IMDBMovieBASE - Get result added year yearsValue: ' + yearsValue + ' | |');
         end else
            LogMessage('Function ParsePage_IMDBMovieBASE - year-metadata not found');
      End;

Fix part of the code.

Quote
   // Go to "Tv Mode"
      StartPos := Pos('<h1 textlength="', HTML);
      if StartPos > 0 then begin
         ItemValue:=HTMLValue(HTML,StartPos,0,'</h1>','releaseinfo/?ref_=tt_ov_rdat">');
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Tv Mode1a: ' + ItemValue + ' | |');
         debug_pos1 := Pos('<a href="', ItemValue);
         if debug_pos1 > 0 then ItemValue := Copy(ItemValue, 0, debug_pos1 - 1);
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Tv Mode1b: ' + ItemValue + ' | |');
         debug_pos1 := Pos('<a class="', ItemValue);
         if debug_pos1 > 0 then ItemValue := Copy(ItemValue, 0, debug_pos1 - 1);
         debug_pos1 := Pos('Original title: ', ItemValue);
         if debug_pos1 > 0 then ItemValue := Copy(ItemValue, 0, debug_pos1 - 1);
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Tv Mode1: ' + ItemValue + ' | |');
         AddCustomFieldValueByName('Tv', ItemValue);
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Tv Mode (CF~Tv~): ' + ItemValue);
         yearValue:=HTMLValue(HTML,StartPos,0,'releaseinfo/?ref_=tt_ov_rdat">','</a></li><li role="presentation" class="ipc-inline-list__item"><a class="');         
         AddCustomFieldValueByName('IMDB Year', yearValue);
         if yearValue <> '' then LogMessage('ParsePage_IMDBMovieBASE -      Get result Tv Mode (CF~IMDB_year~) + : ' + yearValue);
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 28, 2025, 04:57:18 pm
Removed unused parts of Function RemoveTagsEx code and added new and more efficient parts of Function RemoveTagsEx code.

Quote
Function RemoveTagsEx0(AText:String): String; //BlockOpen
    //Ivek23 function for get faster the script
Var
   B, E:Integer;
Begin
   Result := AText;
   B := PosFrom('<', Result, 1);
   E := PosFrom('>', Result, B);
   While (B>0) AND (B<E) Do Begin
      Delete(Result, B, E-B + 1);
      B := Pos('<', Result);
      E := Pos('>', Result);
   End;
End; //BlockClose

Function RemoveTagsEx(AText:String): String; //BlockOpen
    //Ivek23 function for get faster the PLOTKEYWORDS script
Var
   B, E:Integer;
Begin
   Result := AText;
   B := PosFrom('(', Result, 1);
   E := PosFrom(')', Result, B);
   While (B>0) AND (B<E) Do Begin
      Delete(Result, B, E-B + 1);
      B := Pos('(', Result);
      E := Pos(')', Result);
   End;
End; //BlockClose

function RemoveTagsEx_1(AText:String): String; //BlockOpen
    //Ivek23 function for get faster the script
Var
   B, E:Integer;
Begin
   Result := AText;
   B := PosFrom('<', Result, 1);
   E := PosFrom('>', Result, B);
   While (B>0) AND (B<E) Do Begin
      Delete(Result, B, E-B + 1);
      B := Pos('<', Result);
      E := Pos('>', Result);
   End;
End; //BlockClose

function RemoveTagsEx_2(AText:String): String; //BlockOpen
    //Ivek23 function for get faster the script
Var
   B, E:Integer;
Begin
   Result := AText;
   B := PosFrom('<h3 class="', Result, 1);
   E := PosFrom('div">', Result, B);
   //E := PosFrom('</h3>', Result, B);
   While (B>0) AND (B<E) Do Begin
      //Delete(Result, B, E-B + 5);
      Delete(Result, B, E-B + 5);
      B := Pos('<h3 class="', Result);
      E := Pos('div">', Result);
   End;
End; //BlockClose

function RemoveTagsEx0_10(AText:String):String; //BlockOpen
Var
  B,E:Integer;
  TagToRemove: String;
Begin
  Result := AText;
  TagToRemove := '<a class="ipc-link ipc-link--baseAlt ipc-link--inherit-color" tabindex="0" aria-disabled="false" href="';
 
  B := Pos(TagToRemove, Result);
  While B > 0 Do Begin
    E := PosFrom('>', Result, B);
    If (E > B) Then
      Delete(Result, B, E - B + 1)
    Else
      Delete(Result, B, Length(TagToRemove));

    B := Pos(TagToRemove, Result);
  End;
End; //BlockClose

function HTMLValue(HTML: String;StartPos, EndPos:Integer;StartValue, EndValue:String): String; //BlockOpen

Function ParsePage_IMDBMovieBASE

Cleaned up part of code and used new Function RemoveTagsEx code.

Quote
         AddCustomFieldValueByName('IMDB Year', yearValue);
         if yearValue <> '' then LogMessage('ParsePage_IMDBMovieBASE -      Get result Tv Mode (CF~IMDB_year~) + : ' + yearValue);

            ItemValue1 := HTMLValues(HTML, '<h1 textlength="', '</ul>', '"ipc-inline-list__item', '</', '  •  ', StartPos);
            if ItemValue1 <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Tv Mode2a: ' + #13 + ItemValue1 + ' | |' + #13);
            debug_pos1 := Pos('<a class="ipc-metadata', ItemValue1);
            if debug_pos1 >0 then ItemValue1 := Copy(ItemValue1, 0, debug_pos1-1);
            ItemValue1 := RemoveTagsEx0_10(ItemValue1);
            ItemValue1 := StringReplace(ItemValue1, '">', '', True, False, True);
            AddCustomFieldValueByName('Tv2', ItemValue1);
            if ItemValue1 <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Tv Mode2 (CF~Tv2~): ' + #13 + ItemValue1 + ' | |' + #13);
         end else
            LogMessage('Function ParsePage_IMDBMovieBASE - Tv/Tv 2 - metadata not found');

Cleaned part of the code.


Quote
[   //Get ~Metascore~
      EndPos := Pos('</span></span><span class="label"><span class="metacritic-score-label">Metascore</span></span></span></a></li></ul>', HTML);
      if EndPos>0 then begin
         curPos := PrevPos('">', HTML, EndPos) + Length('">');
         EndPos := PosFrom('</span></span><span class="label"><span class="metacritic-score-label">Metascore</span></span></span></a></li></ul>', HTML, curPos) + 2;
         //ItemValue := RemoveTags(Copy(HTML, curPos, endPos-curPos), false);
         ItemValue := Copy(HTML, curPos, endPos-curPos);
         LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Metascore original: ' + ItemValue + ' | |');
         ItemValue := CustomStringReplace(ItemValue, ['0</', '1</', '2</', '3</', '4</', '5</', '6</', '7</', '8</', '9</'], [',0', ',1', ',2', ',3', ',4', ',5', ',6', ',7', ',8', ',9']);
         //curPos := Pos('var ue_t0=ue_t0', ItemValue);                               //WEB_SPECIFIC.
         //If 0<curPos then ItemValue := Copy(ItemValue, 0, curPos-1);
         if ItemValue <> '' then AddCustomFieldValueByName('Metascore', FloatToStr((StrToFloat(ItemValue) * 1)));
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result Metascore in PVD format (CF~Metascore~): ' + ItemValue + ' | |');
      End;

Custom field name changes.

Quote
         //LogMessage('Function ParsePage_IMDBMovieBASE -  Value of ReferencePageDownloaded for Studio: ' + BoolToStr(ReferencePageDownloaded));
      If Not(ReferencePageDownloaded) Then Begin
         // Get ~studio~ "Production Co" (multiple values in a comma separated list)
         curPos := Pos('">Production compan', HTML); // WEB_SPECIFIC.
         If 0 < curPos Then Begin
            EndPos := curPos;
            ItemValue := HTMLValues(HTML, '">Production compan', '</ul>', '<li role="presentation" class="ipc-inline-list__item">', '</li>', ', ', endPos);
            LogMessage('Function ParsePage_IMDBMovieBASE - Get ItemValue Studio/Production Co multiple: ' + ItemValue + ' | |');
            AddFieldValueXML('studio', ItemValue);
            // Custom field: IMDb Studio2 (formatted as "STUDIO RELEASE BY\n[ItemValue]")
            If ItemValue <> '' Then Begin
               ItemValue := 'STUDIO RELEASE BY' + #13#10 + ItemValue;
               AddCustomFieldValueByName('IMDbStudio2', ItemValue);
               //AddCustomFieldValueByName('IMDb Studio2', ItemValue);
               LogMessage('Function ParsePage_IMDBMovieBASE - Get results Studio/Production Co multiple: ' + ItemValue + ' | |');
            End;
         End;
      End;   //If Not(ReferencePageDownloaded) Then Begin should end here
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 28, 2025, 05:22:09 pm
Function ParsePage_IMDBMovieBASE

Cleaned part of the code and Custom field name changes.

Quote
//LogMessage('Function ParsePage_IMDBMovieBASE -      Get results ItemList before If  GET_MINI_FEATURES Then Begin: ' + ItemList + ' | |');
         If  GET_MINI_FEATURES Then Begin
      If Not(TechnicalPageDownloaded) then Begin
      //Get ~features~ (multiline) GET_FULL_FEATURES = False only the info from the main movie page..
            ItemList := '';
            // Get the original "Runtime" (in minutes) as ~length~ (in seconds) instead of the duration of the user movie copy
            curPos := Pos('<span class="ipc-metadata-list-item__label" aria-disabled="false">Runtime</span>', HTML);
            if curPos > 0 then begin
               Hours := StrToInt(HTMLValue(HTML, curPos, 0, '<div class="ipc-metadata-list-item__content-container">', '<!-- --> <!-- -->hour'));
               LogMessage('Function ParsePage_IMDBMovieBASE - Get result Original Runtime: ' + IntToStr(Hours) + ' | |');
               If (Pos('hour<!-- --> <!-- -->', HTML) <> 0) Then
                  Minutes := StrToInt(HTMLValue(HTML, curPos, 0, 'hour<!-- --> <!-- -->', '<!-- --> <!-- -->minutes'))
               Else Minutes := StrToInt(HTMLValue(HTML, curPos, 0, 'hours<!-- --> <!-- -->', '<!-- --> <!-- -->minutes'));
               ItemValue := IntToStr(Hours * 60 + Minutes);
               If ItemValue = '0' then ItemValue := '';
               If ItemValue = '' then Minutes := StrToInt(HTMLValue(HTML, curPos, 0, '<div class="ipc-metadata-list-item__content-container">', '<!-- --> <!-- -->minutes'));
               ItemValue := IntToStr(Hours * 60 + Minutes);
               LogMessage('Function ParsePage_IMDBMovieBASE - duration: ' + ItemValue);
               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE - Get result Original Runtime: ' + ItemValue + ' | |');
               AddCustomFieldValueByName('Imdb Runtime1', IntToStr(Hours) + 'h' + ' ' + IntToStr(Minutes) + 'm (' + ItemValue + ' minutes)');
               ItemList := 'Runtime: ' + ItemList + IntToStr(Hours) + 'h' + ' ' + IntToStr(Minutes) + 'm (' + ItemValue + ' minutes)' + '<br>';            
               AddFieldValueXML('length', IntToStr(60 * StrToInt(ItemValue))); //~length~ Value in seconds.
               if ItemValue <> '' then AddCustomFieldValueByName('Run time1', ItemValue);
//               AddCustomFieldValueByName('Run time', ItemValue);
               if ItemValue <> '' then Begin
               LogMessage('Function ParsePage_IMDBMovieBASE - Get result "Runtime" (in minutes) as ~length~: ' + ItemValue + ' | |');
               end else
               LogMessage('Function ParsePage_IMDBMovieBASE - duration/length not found');

      //Get "Color" (CF~Color~), (CF~Imdb Color~) (multiple values in a comma separated list)
            curPos := Pos('<span class="ipc-metadata-list-item__label" aria-disabled="false">Color</span>', HTML);
               //LogMessage('Function ParsePage_IMDBMovieBASE - Get result curPos (CF~Color~) & (CF~Imdb Color~): ' + IntToStr(curPos) + ' | |');
            if 0<curPos then begin
               EndPos := curPos;
               ItemValue := HTMLValues2(HTML, '<span class="ipc-metadata-list-item__label" aria-disabled="false">Color</span>', '</ul>', '<li role="presentation" class="ipc-inline-list__item">', '</li>', ', ', EndPos);
               //LogMessage('Function ParsePage_IMDBMovieBASE -       Get result ItemValue after HTMLValues2 (CF~Color~) & (CF~Imdb Color~): ' + ItemValue + ' | |');
               //ItemValue := StringReplace(ItemValue, '|        ', ', ', True, True, False);    //WEB_SPECIFIC.
               ItemValue := StringReplace(ItemValue, '(', ' (', True, True, False);          //WEB_SPECIFIC.
               if ItemValue <> '' then ItemList := ItemList + 'Color: ' + ItemValue + '<br>';
               if ItemValue <> '' then AddCustomFieldValueByName('Color:', ItemValue);
               if ItemValue <> '' then AddCustomFieldValueByName('Imdb Color', ItemValue);
               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -       Get result (CF~Color~), (CF~Imdb Color~), (CF~Imdb_Color~) and (CF~Imdb Color:~): ' + ItemValue + ' | |');
            End;
         End;   //If Not(TechnicalPageDownloaded) then Begin should end here
         
      If Not(TechnicalPageDownloaded) And Not(ReferencePageDownloaded) then Begin
      //Get "Sound Mix" info (CF~SILENT_FIELD~), (CF~Sound Mix:~)  (multiple values in a comma separated list)
            curPos := Pos('<span class="ipc-metadata-list-item__label" aria-disabled="false">Sound mix</span>', HTML);
            if 0<curPos then begin
            EndPos := curPos;
               ItemValue := HTMLValues(HTML,
               '<span class="ipc-metadata-list-item__label" aria-disabled="false">Sound mix</span>', '</ul>', '<li role="presentation" class="ipc-inline-list__item">', '</li>', ', ', EndPos);
               //ItemValue := StringReplace(ItemValue, '|        ', ', ', True, True, False);   //WEB_SPECIFIC.
               ItemValue := StringReplace(ItemValue, '(', ' (', True, True, False);          //WEB_SPECIFIC.
               if ItemValue <> '' then ItemList := ItemList + 'Sound Mix: ' + ItemValue + '<br>';
               //LogMessage('Function ParsePage_IMDBMovieBASE -      Get result ItemList After Sound Mix for ~features~: ' + ItemList + ' | |');
               //  SILENT_FIELD       = 'Silent';
               if PosFrom('Silent', ItemValue, 1)>0 then AddCustomFieldValueByName(SILENT_FIELD, '-1');
               if ItemValue <> '' then AddCustomFieldValueByName('Sound Mix:', RemoveTagsEx0(ItemValue));
               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result (CF~Sound Mix:~): ' + ItemValue + ' | |');
            End;
         End;   //      If Not(TechnicalPageDownloaded) And Not(ReferencePageDownloaded) then Begin should end here
            
      If Not(TechnicalPageDownloaded) then Begin   
      //Get "Aspect Ratio" (CF~Aspect Ratio: ~) multiple values in a comma separated list)
            curPos := Pos('">Aspect ratio</span>', HTML);
            if 0<curPos then begin
            //EndPos := curPos;
               ItemValue := HTMLValues(HTML,
               '">Aspect ratio</span>', '</ul></div></li>', '<li role="presentation" class="ipc-inline-list__item">', '</li>', ', ', endPos);
               if ItemValue <> '' then ItemList := ItemList + 'Aspect Ratio: ' + ItemValue + '<br>';
               //LogMessage('Function ParsePage_IMDBMovieBASE -      Get result ItemList After Aspect Ratio for ~features~: ' + ItemList + ' | |');
               ItemValue := StringReplace(ItemValue, '/ (high definition)', ' HD', True, False, True);
               ItemValue := StringReplace(ItemValue, '16:9 HD', '16 : 9  HD', True, False, True);
               ItemValue := StringReplace(ItemValue, '4:3', '4 : 3', True, False, True);
               ItemValue := StringReplace(ItemValue, '2.55: 1', '2.55 : 1', True, False, True);
               ItemValue := StringReplace(ItemValue, '2.39: 1', '2.39 : 1', True, False, True);
               ItemValue := StringReplace(ItemValue, '2.40:1', '2.40 : 1', True, False, True);
               //ItemValue := StringReplace(ItemValue, '1.78 : 1 / (high definition)', '1.78 : 1 (hd)', True, False, True);
               if ItemValue <> '' then AddCustomFieldValueByName('Aspect Ratio:', ItemValue);
               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get result  (CF~Aspect Ratio: ~): ' + ItemValue + ' | |');
            End;
            //(*
            if (Length(ItemList)>0) then begin
               AddCustomFieldValueByName('Imdb-TechSpecs', ItemList);
               if GET_FEATURES then
               AddFieldValueXML('features', ItemList);
               LogMessage('Function ParsePage_IMDBMovieBASE -       Get result ~features~: ' + ItemList + ' | |');
            End;
            //*)
         End;
        End;   //If Not(TechnicalPageDownloaded) then Begin should end here

Need to remove this part of the code because it no longer displays Followed By in the Connections area on the main page.

Quote
      (*

      // Go to "Connections" (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~)
         // Initialize the string to collect all entries
         allItemValues := '';
         
         StartPos := Pos('>Connections<', HTML);
         If StartPos > 0 Then Begin
            // Define the end marker for the "Connections" section
            EndPos := PosFrom('a class="ipc-metadata-list-item__icon-link" tabindex="0" aria-label="See more" ', HTML, StartPos);
            If EndPos > StartPos Then Begin
               // Extract the relevant HTML section
               ItemValue := Copy(HTML, StartPos, EndPos - StartPos);
               //LogMessage('Function ParsePage_IMDBMovieBASE - Get result ItemValue for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) : ' + #13 + ItemValue + ' | |' + #13);

               // Initialize connections container
               Connections := '';

               // Define connection types
               connectionTypes := ['Featured in', 'Follows', 'Followed by', 'Referenced in', 'Remade as', 'Remake of', 'Spin-off', 'Spoofed in', 'Edited into', 'Edited from', 'Version of', 'Features', 'References', 'Spoofs', 'Spin-off from'];

               // Iterate through each type of connection using an indexed loop
               For i := Low(connectionTypes) To High(connectionTypes) Do Begin
                  connType := connectionTypes;
                  connStartPos := PosFrom(connType, ItemValue, 1);
                  While connStartPos > 0 Do Begin
                     connEndPos := PosFrom('</a>', ItemValue, connStartPos) + Length('</a>') - 1;
                     If connEndPos > connStartPos Then Begin
                        connHTML := Copy(ItemValue, connStartPos, connEndPos - connStartPos + 1);
                        //LogMessage('Function ParsePage_IMDBMovieBASE - Get result connHTML for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) : ' + connHTML + ' | |');

                        // Extract the link URL
                        linkStartPos := PosFrom(' href="', connHTML, 1) + Length(' href="');
                        linkEndPos := PosFrom('?ref', connHTML, linkStartPos);
                        linkURL := Copy(connHTML, linkStartPos, linkEndPos - linkStartPos);
                        //LogMessage('Function ParsePage_IMDBMovieBASE - Get result linkURL for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) : ' + linkURL + ' | |');

                        // Extract the link text
                        textStartPos := PosFrom('">', connHTML, linkStartPos) + Length('">');
                        textEndPos := PosFrom('</a', connHTML, textStartPos);
                        yearStartPos := PosFrom('</a>', ItemValue, textStartPos) + Length('</a>');
                        yearEndPos := PosFrom('</div>', ItemValue, yearStartPos);
                        yearValue := Copy(ItemValue, yearStartPos, yearEndPos - yearStartPos);
                        linkText := Copy(connHTML, textStartPos, textEndPos - textStartPos);
                        (*
                        linkText := HTMLValues2(connHTML, linkStartPos, '</div><a class=',  linkEndPos, linkStartPos);
                        //*)
                        (*
                        //LogMessage('Function ParsePage_IMDBMovieBASE - Get result linkText for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~): ' + linkText + ' | |');
                        //LogMessage('Function ParsePage_IMDBMovieBASE - Get result yearValue for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~): ' + yearValue + ' | |');

                        // Build the custom format
                        connHTML := connType + ' <link url="https://www.imdb.com' + linkURL + '">' + linkText + yearValue + '</link>';
                        //LogMessage('Function ParsePage_IMDBMovieBASE - Get result final connHTML for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) : ' + connHTML + ' | |');

                        // Append to connections container
                        If Length(Connections) > 0 Then
                           Connections := Connections + ', ' + connHTML
                        Else
                           Connections := connHTML;
                     End;
                     connStartPos := PosFrom(connType, ItemValue, connStartPos + Length(connHTML));
                  End;
               End;

               LogMessage('Function ParsePage_IMDBMovieBASE - Final processed Connections: ' + Connections + ' | |' + #13);

                Add custom field values
               //AddCustomFieldValueByName('Conect', Connections);
               //AddCustomFieldValueByName('MiniConnections', Connections);

               // Add condition to check "Followed By" presence and add custom field value
               If PosFrom('Followed By', Connections, 1) > 0 Then
                  AddCustomFieldValueByName(FOLLOWEDBY_FIELD, '-1');
            End;
         End Else
            LogMessage('Function ParsePage_IMDBMovieBASE - (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) not found');

      *)
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 28, 2025, 05:27:31 pm
Function ParsePage_IMDBMovieBASE

Quote
// Get ~User Reviews~

This part of the code is added here.

Quote
FullReview := StringReplace(FullReview, '; - )', '', True, False, True);

The whole code is now like this.

Quote
      // Get ~User Reviews~
   curPos := Pos('<section data-testid="UserReviews"', HTML); // Start of the User Reviews section
   If 0 < curPos Then Begin
      // Loop through multiple reviews if needed
      While 0 < curPos Do Begin
         // Find the review subject start
         curPos := PosFrom('data-testid="review-summary"><a href="', HTML, curPos);
         If 0 < curPos Then Begin
            curPos := PosFrom(' class="ipc-title-link-wrapper" tabindex="0"><h3 class="ipc-title__text">', HTML, curPos) + Length(' class="ipc-title-link-wrapper" tabindex="0"><h3 class="ipc-title__text">');
            EndPos := PosFrom('<svg', HTML, curPos);
            ItemValue := Copy(HTML, curPos, EndPos - curPos);
            ItemValue := Trim(ItemValue); // Clean up leading/trailing whitespace
            curPos := EndPos;

            // Find the review content start
            curPos := PosFrom('<div class="ipc-overflowText--children"><div class="ipc-html-content ipc-html-content--base" role="presentation"><div class="ipc-html-content-inner-div" role="presentation">', HTML, curPos) + Length('<div class="ipc-overflowText--children"><div class="ipc-html-content ipc-html-content--base" role="presentation"><div class="ipc-html-content-inner-div" role="presentation">');
            EndPos := PosFrom('</div></div></div></div></div><div class="ipc-list-card__actions">', HTML, curPos);
            ReviewContent := Copy(HTML, curPos, EndPos - curPos);
            ReviewContent := Trim(ReviewContent); // Clean up leading/trailing whitespace

            // Combine review subject and content
            FullReview := ItemValue + #13#10 + '-------------------------------------------' + #13#10 + ReviewContent; // Add new line between subject and content

            // Clean up unnecessary parts of the review content
            FullReview := StringReplace(FullReview, '; - )', '', True, False, True);
            FullReview := StringReplace(FullReview, ':)', '', True, False, True);
            FullReview := StringReplace(FullReview, '=)', '', True, False, True);

            // Add the review to custom fields
            AddCustomFieldValueByName('User Reviews', FullReview);
            AddCustomFieldValueByName('User Comments', FullReview);

            // Log the review
            If FullReview <> '' Then LogMessage('Function ParsePage_IMDBMovieBASE - Get result User Reviews (CF~User Reviews~) (CF~User Comments~): <br>' + FullReview + ' | |');

            // Move to the next review
            curPos := PosFrom('<section data-testid="UserReviews"', HTML, curPos);
         End Else Break;
      End;
   End;

In Function ParsePage_IMDBMovieBASE, everything would be there.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 29, 2025, 12:46:57 pm
Function ParsePage_IMDBMovieMPAA

Fix part of the code.

Quote
    mpaaValue := '';
   
   // 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;
      
      
Custom field to remove.

Quote
      AddFieldValueXML('mpaa', mpaaValue);
      //AddCustomFieldValueByName('IMDB_MPAA', mpaaValue);
      LogMessage('Function ParsePage_IMDBMovieMPAA - Final ~mpaa~ Result: ' + mpaaValue + ' | |');

   // Get "Certification" (CF~Certification~) info


Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 29, 2025, 12:58:31 pm
Function ParsePage_IMDBMovieBASE

Minor code correction.

Quote
   If Not (ReferencePageDownloaded) Then Begin
      If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[19] = '0')) Then Begin
         // Get ~budget~
         //curPos := Pos('<span class="ipc-metadata-list-item__label" aria-disabled="false">Budget</span>', HTML); // WEB_SPECIFIC
         curPos := Pos('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">Budget</span>', HTML); // WEB_SPECIFIC
         If 0 < curPos Then Begin
            ItemValue := TextBetWeen(HTML, '<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">Budget</span><div class="ipc-metadata-list-item__content-container"><ul class="ipc-inline-list ipc-inline-list--show-dividers ipc-inline-list--inline ipc-metadata-list-item__list-content base" role="presentation"><li role="presentation" class="ipc-inline-list__item"><span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable" aria-disabled="false">', '</span></li></ul>', false, curPos); // Strings which opens/closes the data. WEB_SPECIFIC
            ItemValue := StringReplace(ItemValue, ' (estimated)', '', True, True, False); // Eliminate '(estimated)' if exists
            if ItemValue <> '' then AddCustomFieldValueByName('ProductionBudget', ItemValue);
            ItemValue := StringReplace(ItemValue, 'EUR', '', True, True, False); // Eliminate 'EUR' if exists
            ItemValue := StringReplace(ItemValue, #36, '', True, True, False); // Eliminate '$' if exists
            ItemValue := StringReplace(ItemValue, '€', '', True, True, False); // Eliminate '€' if exists
            ItemValue := StringReplace(ItemValue, ',', '', True, True, False); // Eliminate ',' if exists
            AddFieldValueXML('budget', ItemValue);
            if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE - ParsePage_IMDBMovieBASE - Get results ~budget~: ' + ItemValue + ' | |');
         End;
      End;
   End;   //If Not (ReferencePageDownloaded) Then Begin should end here
   
      //Get (CF~Domestic~) Gross US & Canada
      //curPos:=Pos('<span class="ipc-metadata-list-item__label" aria-disabled="false">Gross US & Canada</span>',HTML);      //WEB_SPECIFIC
      curPos:=Pos('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">Gross US & Canada</span>',HTML);      //WEB_SPECIFIC
      If 0<curPos Then Begin       
         ItemValue:=TextBetWeen(HTML,'<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">Gross US & Canada</span>','</li></ul>',false,curPos);      //Strings which opens/closes the data. WEB_SPECIFIC
         //LogMessage('Function ParsePage_IMDBMovieBASE -      Get results BoxOffice Gross US & Canada:'+ItemValue+'||');
         if ItemValue <> '' then AddCustomFieldValueByName('Domestic',ItemValue);      
         ItemValue:=StringReplace(ItemValue,#36,'',True,True,False);        //Eliminate '$' if exists 
         ItemValue:=StringReplace(ItemValue,'€','',True,True,False);        //Eliminate '€' if exists         
         ItemValue:=StringReplace(ItemValue,',','',True,True,False);        //Eliminate ',' if exists       
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -      Get results Box Office Gross US & Canada  (CF~Domestic~):'+ItemValue+'||');
      End;   
   
      If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[20] = '0')) Then Begin
         // Get ~money~ +  (CF~Worldwide~) Box Office worldwide
         //curPos := Pos('<span class="ipc-metadata-list-item__label" aria-disabled="false">Gross worldwide</span>', HTML); // WEB_SPECIFIC
         curPos := Pos('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">Gross worldwide</span>', HTML); // WEB_SPECIFIC
         If 0 < curPos Then Begin
            ItemValue := TextBetWeen(HTML, '<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">Gross worldwide</span><div class="ipc-metadata-list-item__content-container"><ul class="ipc-inline-list ipc-inline-list--show-dividers ipc-inline-list--inline ipc-metadata-list-item__list-content base" role="presentation"><li role="presentation" class="ipc-inline-list__item"><span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable" aria-disabled="false">', '</span></li></ul>', false, curPos); // Strings which opens/closes the data. WEB_SPECIFIC
            LogMessage('Function ParsePage_IMDBMovieBASE -      Get results BoxOffice worldwide: ' + ItemValue + ' | |');

            // Process the monetary value for XML
            MoneyValue := ItemValue;
            MoneyValue := StringReplace(MoneyValue, #36, '', True, True, False); // Eliminate '$' if exists
            MoneyValue := StringReplace(MoneyValue, '€', '', True, True, False); // Eliminate '€' if exists
            MoneyValue := StringReplace(MoneyValue, ',', '', True, True, False); // Eliminate ',' if exists
            LogMessage('Function ParsePage_IMDBMovieBASE - Processed Box Office value for "money" PVD field: ' + MoneyValue);
            AddFieldValueXML('money', MoneyValue);

            // Add the Worldwide value with currency symbol
            If ItemValue <> '' Then AddCustomFieldValueByName('Worldwide', ItemValue);

            If MoneyValue <> '' Then LogMessage('Function ParsePage_IMDBMovieBASE - Get results Box Office worldwide ~money~ +  (CF~Worldwide~): ' + MoneyValue + ' | |');
         End;
      End;
      
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 30, 2025, 12:53:48 pm
Function ParsePage_IMDBMovieAKA

Minor code correction.

Quote
//(*   
    //Get ~aka~ (multiple values in a line break separated list) Be careful don't repeat #13
   // Note that "For" loop iterates through each element in the ItemArray and checks if it is already present in the ItemValue string. If it's not present, it adds it to ItemValue. only unique AKA values are stored and logged!
    //if (Pos('It looks like we don' + Chr(39) + 't have any AKAs for this title yet.', HTML)>0) then Exit;
    //Go to "Also Known As"
    curPos := Pos('<h3 class="ipc-title__text"><span id="akas">Also Known As (AKA)</span>', HTML);                      //Strings start which opens the block content data. WEB_SPECIFIC
   If 0<curPos then begin
      EndPos := curPos;
      //ItemList := HTMLValues2(HTML, '<h3 class="ipc-title__text"><span id="akas">Also Known As (AKA)</span>', '</section>', '<label class="', '</label>', '*', EndPos);
      ItemList := HTMLValues2(HTML, '<h3 class="ipc-title__text"><span id="akas">Also Known As (AKA)</span>', '</section>', '<span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable"', '</span>', '*', EndPos);
      //LogMessage('Function ParsePage_IMDBMovieAKA -      Get result ItemList: ' + ItemList);
      ItemValue1 := ItemList;
      ExplodeString(ItemList, ItemArray, '*');
      ItemValue := '';
      For index := Low(ItemArray) To High(ItemArray) Do Begin        //Remember index begins at 0
         //LogMessage('Function ParsePage_IMDBMovieAKA -      Get result ItemArray[index]*: ' + ItemArray[index]);
         If (Pos(ItemArray[index], ItemValue)=0) Then ItemValue := ItemValue + '<br>' + ItemArray[index];
      End;
      //ItemValue := StringReplace(ItemValue, '', '', True, True, False);
      AddFieldValueXML('aka', ItemValue);
      AddCustomFieldValueByName('Imdb Aka', ItemValue);
      if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieAKA -      Get results ~aka~ & (CF~Imdb Aka~) : ' + ItemValue);
   End;
//*)
//(*   
// Initialize the string to collect all entries
allItemValues := '';

// Get "Also Known As (AKA)" information with countries
curPos := Pos('>Also Known As (AKA)<', HTML);
If 0 < curPos Then Begin
    EndPos := PosFrom('</section>', HTML, curPos);

    While curPos < EndPos Do Begin
        // Find each list item
        curPos := PosFrom('<li role="presentation" class="ipc-metadata-list__item', HTML, curPos);
        If (curPos = 0) Or (curPos > EndPos) Then Break;

        // Extract the country or label
        countryStart := PosFrom('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable"', HTML, curPos) + Length('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false">');
        countryEnd := PosFrom('</span>', HTML, countryStart);
        countryValue := Copy(HTML, countryStart, countryEnd - countryStart);

        // Extract the AKA title
        akaStart := PosFrom('<span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable"', HTML, countryEnd) + Length('<span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable" aria-disabled="false">');
        akaEnd := PosFrom('</span>', HTML, akaStart);
        akaValue := Copy(HTML, akaStart, akaEnd - akaStart);

        // Move curPos past the end of the AKA title span
        curPos := akaEnd + Length('</span>');

        // Extract any subText (like (English), (Japanese), etc.)
        subTextStart := PosFrom('<span class="ipc-metadata-list-item__list-content-item--subText"', HTML, akaEnd);
        If (subTextStart > 0) And (subTextStart < PosFrom('</li>', HTML, akaStart)) Then Begin
            subTextStart := subTextStart + Length('<span class="ipc-metadata-list-item__list-content-item--subText">');
            subTextEnd := PosFrom('</span>', HTML, subTextStart);
            subText := Copy(HTML, subTextStart, subTextEnd - subTextStart);
            akaValue := akaValue + ' ' + subText;
            // Move curPos past the end of the subText span
            curPos := subTextEnd + Length('</span>');
        End Else
            subText := '';

        // Combine country and AKA for the custom field
        ItemValue := countryValue + ' - ' + akaValue;

        // Collect the result
        allItemValues := allItemValues + ItemValue + #13#10;

        // Move to the next list item
        curPos := PosFrom('</li>', HTML, curPos) + Length('</li>');
    End;

    // Add the collected results to the custom field
    AddCustomFieldValueByName('IMDbCountryAKA', allItemValues);
    LogMessage('Function ParsePage_IMDBMovieAKA - Get result IMDbCountryAKA: ' + allItemValues);
End;
//*)
//(*
   // Get (CF~IMDbPremiereDates~) information with countries and dates
      // Initialize the string to collect all entries
      allItemValues := '';

      curPos := Pos('<h3 class="ipc-title__text"><span id="releases">Release Date</span>', HTML);
      LogMessage('Function ParsePage_IMDBMovieAKA - CurPos initial: ' + IntToStr(curPos));
      If 0 < curPos Then Begin
         EndPos := PosFrom('</section>', HTML, curPos);
         //LogMessage('Function ParsePage_IMDBMovieAKA - EndPos: ' + IntToStr(EndPos));

         While curPos < EndPos Do Begin
            // Find each list item
            curPos := PosFrom('<li role="presentation" class="ipc-metadata-list__item ipc-metadata-list', HTML, curPos);
            //LogMessage('Function ParsePage_IMDBMovieAKA - CurPos list item: ' + IntToStr(curPos));
            If (curPos = 0) Or (curPos > EndPos) Then Break;

            // Extract the country or label
            countryStart := PosFrom('aria-label="', HTML, curPos) + Length('aria-label="');
            countryEnd := PosFrom('"', HTML, countryStart);
            countryValue := Copy(HTML, countryStart, countryEnd - countryStart);
            //LogMessage('Function ParsePage_IMDBMovieAKA - CountryValue for (CF~IMDbPremiereDates~): ' + countryValue);

            // Extract the release date
            dateStart := PosFrom('<span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable" aria-disabled="false">', HTML, countryEnd) + Length('<span class="ipc-metadata-list-item__list-content-item ipc-btn--not-interactable" aria-disabled="false">');
            dateEnd := PosFrom('</span>', HTML, dateStart);
            dateValue := Copy(HTML, dateStart, dateEnd - dateStart);
            //LogMessage('Function ParsePage_IMDBMovieAKA - DateValue for (CF~IMDbPremiereDates~): ' + dateValue);

            // Move curPos past the end of the date span
            curPos := dateEnd + Length('</span>');
            //LogMessage('Function ParsePage_IMDBMovieAKA - CurPos after date for (CF~IMDbPremiereDates~): ' + IntToStr(curPos));

            // Extract any subText (like (limited), (Fantasia International Film Festival), etc.)
            subTextStart := PosFrom('<span class="ipc-metadata-list-item__list-content-item--subText"', HTML, dateEnd);
            //LogMessage('Function ParsePage_IMDBMovieAKA - SubTextStart for (CF~IMDbPremiereDates~): ' + IntToStr(subTextStart));
            If (subTextStart > 0) And (subTextStart < PosFrom('</li>', HTML, dateStart)) Then Begin
               subTextStart := subTextStart + Length('<span class="ipc-metadata-list-item__list-content-item--subText">');
               subTextEnd := PosFrom('</span>', HTML, subTextStart);
               subText := Copy(HTML, subTextStart, subTextEnd - subTextStart);
               dateValue := dateValue + ' ' + subText;
               // Move curPos past the end of the subText span
               curPos := subTextEnd + Length('</span>');
               //LogMessage('Function ParsePage_IMDBMovieAKA - SubText for (CF~IMDbPremiereDates~): ' + subText);
               //LogMessage('Function ParsePage_IMDBMovieAKA - CurPos after subText for (CF~IMDbPremiereDates~): ' + IntToStr(curPos));
            End Else
               subText := '';

            // Combine country, date, and subText for the custom field
            ItemValue := countryValue + ' - ' + dateValue;
            //LogMessage('Function ParsePage_IMDBMovieAKA - ItemValue for (CF~IMDbPremiereDates~): ' + ItemValue);

            // Collect the result
            allItemValues := allItemValues + ItemValue + #13#10;

            // Move to the next list item
            curPos := PosFrom('</li>', HTML, curPos) + Length('</li>');
            //LogMessage('Function ParsePage_IMDBMovieAKA - CurPos after </li>: ' + IntToStr(curPos));
         End;

         // Add the collected results to the custom field
         AddCustomFieldValueByName('IMDbPremiereDates', allItemValues);
         LogMessage('Function ParsePage_IMDBMovieAKA - Get result (CF~IMDbPremiereDates~): ' + allItemValues);
      End;
//*)

    LogMessage('Function ParsePage_IMDBMovieAKA END=====================| |');
   //LogMessage('Function ParsePage_IMDBMovieAKA: Ending processing.')
  End; //BlockClose
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 30, 2025, 01:17:08 pm
Function ParsePage_IMDBMovieMPAA

Minor code correction.

Quote
//(*
   // Get "Certification" (CF~Certification~) info
      If Pos('<span id="certificates">Certifications</span>', HTML) > 0 Then
      Begin
        curPos := Pos('<span id="certificates">Certifications</span>', HTML);
        EndPos := PosFrom('</section>', HTML, curPos);

        // Extract the relevant section
        Section := Copy(HTML, curPos, EndPos - curPos);
        //LogMessage('Function ParsePage_IMDBMovieMPAA - Extract the relevant Section: ' + Section + ' | |');

        curPos := 1;
        ItemValue1 := '';

        // Parse the certification items
        While PosFrom('"certificates-item">', Section, curPos) > 0 Do
        Begin
         // Move to the label
         curPos := PosFrom('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false"', Section, curPos) + Length('<span class="ipc-metadata-list-item__label ipc-btn--not-interactable" aria-disabled="false"');
         categoryName := TextBetween(Section, '>', '</span>', False, curPos);
         //LogMessage('Function ParsePage_IMDBMovieMPAA - categoryName after TextBetween: ' + categoryName + ' | |');

         // Move to the value
         curPos := PosFrom('href="', Section, curPos) + Length('href="');
         categoryValue := TextBetween(Section, '">', '</a>', False, curPos);
         //LogMessage('Function ParsePage_IMDBMovieMPAA - categoryValue after TextBetween: ' + categoryValue + ' | |');

         // Format the category link with proper spaces
         ItemValue1 := ItemValue1 + '   •   ' + categoryName + ': ' + categoryValue + '<br>';

         // Move to the next item
         curPos := PosFrom('</li>', Section, curPos) + Length('</li>');
        End;

        // Remove the trailing "   •   " if it exists and keep the last </br> intact
        If Copy(ItemValue1, Length(ItemValue1) - 14, 14) = '<br>   •   ' Then
        Begin
         ItemValue1 := Copy(ItemValue1, 1, Length(ItemValue1) - 14);
        End;

        AddCustomFieldValueByName('Certification', 'Certification<br>' + ItemValue1);
        If ItemValue1 <> '' Then
         LogMessage('Function ParsePage_IMDBMovieMPAA - Certification:<br>' + ItemValue1 + ' | |');
      End
      Else
      Begin
        LogMessage('Function ParsePage_IMDBMovieMPAA - Certification section not found');
        Result := prError; // Set to error if Certification section is not found
      End;
//*)
    LogMessage('Function ParsePage_IMDBMovieMPAA END=====================| |');
  End; //BlockClose
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 31, 2025, 07:32:49 am
Function ParsePage_IMDBMovieREFERENCE

Minor code correction.

Quote
Function ParsePage_IMDBMovieREFERENCE(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result := prFinished; Script has finished gathering data
    //     Result := prError; //It will change to prError if any major issue occurs and will exit;
    //Retrieve: REFERENCE~
  Var
    curPos, endPos, debug_pos1:Integer;
    MoviesID, MoviesID2: String;
   ItemValue, ItemList, ItemList2, ItemList22: String;
   ItemValue22, ItemValue3, ItemValue30, ItemValue31: String;
   ItemValue00, ItemValue0, ItemValue1, ItemValue2: String;
   ItemValue10, ItemValue11, ItemValue12, ItemValue40: String;
   ItemValue100, ItemValue120, ItemValue140, ItemValue220: String;
    ItemValue33, ItemList33, enTitleValue, enTitleList: String;
   ItemValue320, ItemValue330: String;
   .
   .
   .
   
  Begin
    LogMessage('Function ParsePage_IMDBMovieREFERENCE BEGIN=====================| |');
    Result := prFinished;  //It will change to prError if any major issue occurs and will exit;   
Quote
      //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Value of ReleaseInfoPageDownloaded: ' + BoolToStr(ReleaseInfoPageDownloaded))
      // Get Imdb Release Date ~rdate~, (CF~IMDB Release Date~), (CF~IMDB Release Dates~)
            ItemValue120 := TextBetWeenFirst(ItemList, '/releaseinfo">', '</a>');
            if ItemValue120 <> '' then LogMessage('Function  -      Get result ItemValue120: ' + ItemValue120 + ' | |');
            if ItemValue120 <> '' then AddCustomFieldValueByName('Imdb Release Date', ItemValue120);
            //AddCustomFieldValueByName('IMDB Release Dates', ItemValue120);
            LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result DatePublished (CF~IMDB Release Date~): ' + ItemValue120 + ' | |');
            ItemValue320 := TextBetWeenFirst(ItemList, '/releaseinfo">', ' (');
            //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result DatePublished 320 for ~rdate~): ' + ItemValue320 + ' | |');
         //   ItemValue320 := ConfDate2(ItemValue320);
            //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result DatePublished ItemValue320 after ConfDate2 for ~rdate~): ' + ItemValue320 + ' | |');
         //   AddFieldValueXML('rdate', ItemValue320); // Function ConfDate2 to ensure the day and month always have two digits and to format the date independently of regional settings.
            LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result ~rdate~: ' + ItemValue320 + ' | |');
            //End;
Quote
      //Get Plot Summary from "Storyline" section as ~description~
            curPos := Pos('<td class="ipl-zebra-list__label">Plot Summary</td>', HTML);                                 //WEB_SPECIFIC.
            If 0<curPos then begin
               ItemValue330 := TextBetWeen(HTML, '<p>', '</p>', false, curPos);        //Strings which opens/closes the data. WEB_SPECIFIC
               //LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result ItemValue330 for ~description~ from the "Storyline": ' + #13 + ItemValue330 + ' | |');
               curPos := Pos('Written by', ItemValue330);                               //WEB_SPECIFIC.
               If 0<curPos then ItemValue330 := Copy(ItemValue330, 0, curPos-1);
               curPos := Pos('Seasons', ItemValue330);                               //WEB_SPECIFIC.
               If 0<curPos then ItemValue330 := Copy(ItemValue330, 0, curPos-1);
               curPos := Pos('Season', ItemValue330);                               //WEB_SPECIFIC.
               If 0<curPos then ItemValue330 := Copy(ItemValue330, 0, curPos-1);
               curPos := Pos('Year:', ItemValue330);                               //WEB_SPECIFIC.
               If 0<curPos then ItemValue330 := Copy(ItemValue330, 0, curPos-1);
               ItemValue330 := StringReplace(ItemValue330, 'Know what this is about?', '', true, false, true);  //Cleaning. WEB_SPECIFIC.
               ItemValue330 := StringReplace(ItemValue330, 'Be the first one to add a plot.', '', true, false, true);  //Cleaning. WEB_SPECIFIC.
               ItemValue330 := StringReplace(ItemValue330, 'IMDb Answers surfaces high-value content that is missing from IMDb.', '', true, false, true);  //Cleaning. WEB_SPECIFIC.
               ItemValue330 := StringReplace(ItemValue330, ' -- ', ' — ', True, False, True);
               //AddFieldValueXML('description', ItemValue330);
               if ItemValue330 <> '' then LogMessage('Function ParsePage_IMDBMovieREFERENCE -      added result for ~description~ from the "Storyline": ' + #13 + ItemValue330 + ' | |');
            End;
            if (ItemValue330 = '') AND (ItemValue22 <> '') then
            AddFieldValueXML('description', ItemValue22);
            AddCustomFieldValueByName('Description', ItemValue22);
            if (ItemValue330 <> '') AND (ItemValue22 <> '') then
            AddFieldValueXML('description', ItemValue330);
            AddCustomFieldValueByName('Description', ItemValue330);
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 31, 2025, 09:43:19 am
Function ParsePage_IMDBMovieREFERENCE

Custom field to remove.

Quote
   //(*
   // Get (CF~Year~) and ~year~
   If Pos('<div id="content-2-wide" class="redesign">', HTML)>0 Then Begin
      curPos := PosFrom('<h3 itemprop="name">', HTML, EndPos);
      EndPos := PosFrom('<section class="titlereference-section-overview">', HTML, curPos);
      ItemList := Copy(HTML, curPos, endPos-curPos);
      ItemValue10 := TextBetWeenFirst(ItemList, 'itemprop="url">', '</a>');
      //if ItemValue10 <> '' then AddCustomFieldValueByName('IMDB_year', ItemValue10);
      if ItemValue10 <> '' then AddCustomFieldValueByName('Year', ItemValue10);
      //If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[4] = '0')) Then Begin
      if ItemValue10 <> '' then AddFieldValueXML('year', ItemValue10); //It looks like there is a bug in PVD. Year will be populated even if set to "None" in PVD)
      //End;
Quote
      // Get ~imdbrating~ (CF~IMDB Rating~), (~IMDBRating~)
            ItemValue2 := TextBetWeenFirst(ItemList, '<span class="ipl-rating-star__rating">', '</span>');
            //ItemValue2 := StringReplace(ItemValue2, ',', '.', True, False, False);       
            If ItemValue2 = '0' then ItemValue2 := '';
            if ItemValue2 <> '' then LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result ItemValue2: ' + ItemValue2 + ' | |');
            //if ItemValue2 <> '' then ItemList2 := ItemList2 + ItemValue2;
            //LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result  ItemList2 + ItemValue: ' + ItemList2 + ItemValue2 + ' | |');
         AddFieldValueXML('imdbrating',ItemValue2);
         LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result ratingValue ~imdbrating~ (CF~IMDB Rating~), (~IMDBRating~): ' + ItemValue2 + ' | |');
Quote
      // Get IMDb Votes (CF~IMDB_Votes~), (CF~IMDB Votes~), (CF~IMDB Votes:~)
            ItemValue12 := TextBetWeenFirst(ItemList, '<span class="ipl-rating-star__total-votes">(', ')</span>');
            ItemValue12 := StringReplace(ItemValue12, '.', '', True, False, False);       
            AddCustomFieldValueByName('IMDB Votes', ItemValue12);
            AddCustomFieldValueByName('IMDB Votes:', ItemValue12);
            if ItemValue12 <> '' then LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result ratingCount (CF~IMDB_Votes~): ' + ItemValue12 + ' | |');
            if ItemValue12 <> '' then LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result ItemValue12: ' + ItemValue12 + ' | |');
            //if ItemValue12 <> '' then ItemList2 := ItemList2 + '  ' + #8226 + '  ' + ItemValue12;
            //LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result   ItemList2: ' + ItemList2 + ' | |');
Quote
      //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Value of ReleaseInfoPageDownloaded: ' + BoolToStr(ReleaseInfoPageDownloaded))
      // Get Imdb Release Date ~rdate~, (CF~IMDB Release Date~), (CF~IMDB Release Dates~)
            ItemValue120 := TextBetWeenFirst(ItemList, '/releaseinfo">', '</a>');
            if ItemValue120 <> '' then LogMessage('Function  -      Get result ItemValue120: ' + ItemValue120 + ' | |');
            if ItemValue120 <> '' then AddCustomFieldValueByName('Imdb Release Date', ItemValue120);
            LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result DatePublished (CF~IMDB Release Date~): ' + ItemValue120 + ' | |');
            //End;
Quote
      // Get ~studio~ and (CF~IMDb Studio2~) "Production Co" (multiple values in a comma separated list)
            curPos := Pos('">Production compan', HTML); // WEB_SPECIFIC.
            //curPos := Pos('<a href="/company/co', HTML) + Length('<a href="/company/co'); // WEB_SPECIFIC.
               If 0 < curPos Then Begin
                  EndPos := curPos;
                  ItemValue := HTMLValues(HTML, '">Production compan', '</ul>', '<li>', '</a>', ', ', endPos);
                  //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get ItemValue Studio/Production Co multiple: ' + ItemValue + ' | |');
                  AddFieldValueXML('studio', ItemValue);
                  LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get results Studio/Production Co: ' + ItemValue + ' | |');
               End;
Quote
      If Not(TechnicalPageDownloaded) then Begin
      //If Not (USE_SAVED_PVDCONFIG And (ConfigOptions[23] = '0')) Then Begin
      // Get the original "Runtime" (in minutes) as ~length~ (in seconds), CF~Run time1~), and (CF~Imdb Runtime1~) instead of the duration of the user movie copy
               curPos := Pos('</li>', ItemList) + Length('</li>');
               //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result curPos for ~length~: ' + IntToStr(curPos) + ' | |');
               ItemList := Copy(ItemList, curPos, endPos - curPos);
               //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result ItemList for ~length~: ' + ItemList + ' | |');
               ItemValue := TextBetWeenFirst(ItemList, '<li class="ipl-inline-list__item">', '</li>');
               LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result ItemValue for ~length~: ' + ItemValue + ' | |');

               if curPos > 0 then
               begin
                  // Extract hours and minutes
                  Hours := 0;
                  Minutes := 0;
                  
                  if Pos('h', ItemValue) > 0 then
                  begin
                     Hours := StrToIntDef(Copy(ItemValue, 1, Pos('h', ItemValue) - 1), 0);
                     ItemValue := Copy(ItemValue, Pos('h', ItemValue) + 1, Length(ItemValue));
                  end;
                  
                  if Pos('min', ItemValue) > 0 then
                  begin
                     Minutes := StrToIntDef(Copy(ItemValue, 1, Pos('min', ItemValue) - 1), 0);
                  end;
                  
                  ItemValue := IntToStr(Hours * 60 + Minutes);
                  if ItemValue = '0' then ItemValue := '';
                  
                  if ItemValue <> '' then
                  begin
                     //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result Original Runtime: ' + ItemValue + ' | |');
                     AddFieldValueXML('length', IntToStr(60 * StrToInt(ItemValue))); //~length~ Value in seconds.
                     AddCustomFieldValueByName('Run time 1', ItemValue);
                     AddCustomFieldValueByName('Imdb Runtime 1', IntToStr(Hours) + 'h' + ' ' + IntToStr(Minutes) + 'm (' + ItemValue + ' minutes)');
                     LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result "Runtime" (in minutes) ~length~, (CF~Run time1~), and (CF~Imdb Runtime1~) : ' + ItemValue + ' | |');
                  end;
               end
               else
               begin
                  LogMessage('Function ParsePage_IMDBMovieREFERENCE - duration/length not found');
               end;
         //End;
      End;   //   If Not(TechnicalPageDownloaded) then Begin should end here


Quote
      If Not (MainPageDownloaded) And Not (TechnicalPageDownloaded) Then Begin
      //Get "Color" (CF~Color :~) & (CF~'Imdb Color :~) (multiple values in a comma separated list)
            curPos := Pos('<td class="ipl-zebra-list__label">Color</td>', HTML);
               //LogMessage('Function ParsePage_IMDBMovieBASE - Get result curPos (CF~Color~) & (CF~Imdb Color~): ' + IntToStr(curPos) + ' | |');
            if 0<curPos then begin
               EndPos := curPos;
               ItemValue := HTMLValues2(HTML, '<td class="ipl-zebra-list__label">Color</td>', '</ul>', '<li class="ipl-inline-list__item">', '</li>', ', ', EndPos);
               //LogMessage('Function ParsePage_IMDBMovieREFERENCE -       Get result ItemValue after HTMLValues2 (CF~Color~) & (CF~Imdb Color~): ' + ItemValue + ' | |');
               //ItemValue := StringReplace(ItemValue, '|        ', ', ', True, True, False);    //WEB_SPECIFIC.
               ItemValue := StringReplace(ItemValue, '(', ' (', True, True, False);          //WEB_SPECIFIC.
               if ItemValue <> '' then ItemList := ItemList + 'Color: ' + ItemValue + '<br>';
               if ItemValue <> '' then AddCustomFieldValueByName('Color :', ItemValue);
               if ItemValue <> '' then AddCustomFieldValueByName('Imdb Color :', ItemValue);

               if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieBASE -       Get result (CF~Color :~) and (CF~Imdb Color :~): ' + ItemValue + ' | |');
            End;
      End;   //If Not (MainPageDownloaded) And Not (TechnicalPageDownloaded) Then Begin should end here

Removing unnecessary parts of the code.

Quote
(*
   If Not (MainPageDownloaded) Then Begin
   // Go to "Connections" (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~)
      // Initialize the string to collect all entries
      allItemValues := '';
      
      StartPos := Pos('<td class="ipl-zebra-list__label">Movie Connections</td>', HTML);
      If StartPos > 0 Then Begin
         // Define the end marker for the "Connections" section
         EndPos := PosFrom('</tr>', HTML, StartPos);
         If EndPos > StartPos Then Begin
            // Extract the relevant HTML section
            ItemValue := Copy(HTML, StartPos, EndPos - StartPos);
            //LogMessage('Function ParsePage_IMDBMovieREFERENCE - Get result ItemValue for (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) : ' + #13 + ItemValue + ' | |' + #13);

            // Initialize connections container
            Connections := '';

            // Define connection types
            connectionTypes := ['Featured in', 'Follows', 'Followed by', 'Referenced in', 'Remade as', 'Remake of', 'Spin-off', 'Spoofed in', 'Edited into', 'Edited from', 'Version of', 'Features', 'References', 'Spoofs', 'Spin-off from'];

            // Iterate through each type of connection using an indexed loop
            For i := Low(connectionTypes) To High(connectionTypes) Do Begin
               connType := connectionTypes;
               connStartPos := PosFrom(connType, ItemValue, 1);
               While connStartPos > 0 Do Begin
                  connEndPos := PosFrom('</a>', ItemValue, connStartPos) + Length('</a>') - 1;
                  If connEndPos > connStartPos Then Begin
                     connHTML := Copy(ItemValue, connStartPos, connEndPos - connStartPos + 1);

                     // Extract the link URL
                     linkStartPos := PosFrom('<a href="', connHTML, 1) + Length('<a href="');
                     linkEndPos := PosFrom('">', connHTML, linkStartPos);
                     linkURL := Copy(connHTML, linkStartPos, linkEndPos - linkStartPos);

                     // Extract the link text
                     textStartPos := linkEndPos + Length('">');
                     textEndPos := PosFrom('</a>', connHTML, textStartPos);
                     linkText := Copy(connHTML, textStartPos, textEndPos - textStartPos);

                     // Build the custom format
                     connHTML := connType + ' <link url="https://www.imdb.com' + linkURL + '">' + linkText + '</link>';

                     // Append to connections container
                     If Length(Connections) > 0 Then
                        Connections := Connections + ', ' + connHTML
                     Else
                        Connections := connHTML;
                  End;
                  connStartPos := PosFrom(connType, ItemValue, connStartPos + Length(connHTML));
               End;
            End;

            LogMessage('Function ParsePage_IMDBMovieREFERENCE - Final processed Connections: ' + Connections + ' | |' + #13);

            // Add custom field values
            AddCustomFieldValueByName('Conect', Connections);
            AddCustomFieldValueByName('MiniConnections', Connections);

            // Add condition to check "Followed By" presence and add custom field value
            If PosFrom('Followed By', Connections, 1) > 0 Then
               AddCustomFieldValueByName(FOLLOWEDBY_FIELD, '-1');
         End;
      End Else
         LogMessage('Function ParsePage_IMDBMovieREFERENCE - (CF~Conect~) (CF~MiniConnections~) (CF~FOLLOWEDBY_FIELD~) not found');
   *)
      (*
      //Go to "Soundtracks" (CF~MiniSoundtracks~)
      StartPos := Pos('<td class="ipl-zebra-list__label">Soundtracks</td>', HTML);
      if StartPos>0 then begin
         //ItemValue := HTMLValue(HTML, StartPos, 0, '<div><span class="soundtrack-', '</div>');
         ItemValue := TextBetWeen(HTML, '<td>', '<a href=', False, StartPos);
         AddCustomFieldValueByName('MiniSoundtracks', ItemValue);
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieREFERENCE -      Get result Soundtracks (CF~MiniSoundtracks~): ' + #13 + ItemValue + #13);
      end else
         LogMessage('Function ParsePage_IMDBMovieREFERENCE - (CF~MiniSoundtracks~) not found');   
   End;   //If Not (MainPageDownloaded) Then Begin should end here
*)   
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 31, 2025, 09:59:36 am
Function ParsePage_IMDBMovieTECHNICAL

Removing unnecessary parts of the code.

Quote
    //Get "Technical Specifications" info
    curPos := Pos('<hgroup><h1 class="ipc-title__text">Technical specifications</h1></hgroup>', HTML);
    if (curPos=0) then Exit;
      EndPos := curPos;

   ItemList2 := TextBetWeenFirst(HTML, '<h1 class="ipc-title__text">Technical specifications<', 'span id="contribute">Contribute to this page</span>'); //WEB_SPECIFIC.
   If (Length(ItemList2)>0) Then Begin

Removing unnecessary parts of code for custom fields.

Quote
     //Get "Sound Mix" info (CF~SILENT_FIELD~), (CF~Imdb SoundMix~) and (CF~Imdb Sound Mix~)
      curPos := Pos('Sound Mix', ItemList2);               //WEB_SPECIFIC.
      If 2<curPos Then Begin
         ItemValue := HTMLValues2(HTML, 'Sound Mix', '</ul>', '<li role="presentation" class="ipc-inline-list__item">', '</li>', '   ', EndPos);             //WEB_SPECIFIC.
         ItemValue1 := ItemValue;
         ItemValue := StringReplace(ItemValue, '   ', #13, True, False, True);
         ItemValue := StringReplace(ItemValue, '(', ' (', True, False, True);
         If ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      Get result Sound Mix: ' + ItemValue + ' | |');
         if ItemValue <> '' then ItemList := ItemList + 'Sound Mix' + '<br>' + ItemValue + '<br><br>';
         //  SILENT_FIELD       = 'Silent';
         if PosFrom('Silent', ItemValue, 1)>0 then AddCustomFieldValueByName(SILENT_FIELD, '-1');
         if ItemValue <> '' then AddCustomFieldValueByName('Imdb SoundMix', ItemValue);
         ItemValue1 := StringReplace(ItemValue1, '   ', #13 + ',  ', True, False, True);
         if ItemValue <> '' then AddCustomFieldValueByName('Imdb Sound Mix', RemoveTagsEx0(ItemValue1));
         If ItemValue1 <> '' then LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      Added result for (CF~Imdb SoundMix~) and (CF~Imdb Sound Mix~): ' + ItemValue1 + ' | |');
      End;

   
Quote
  //Get "Aspect Ratio" (CF~Imdb AspectRatio~), (CF~Imdb_Aspect Ratio~), (CF~Imdb Aspect Ratio~), (CF~Aspect Ratio~), (CF~Imdb Aspect Ratio:~) and (CF~Aspect Ratio:~) info
      curPos := Pos('Aspect Ratio', ItemList2);                //WEB_SPECIFIC.
      If 2<curPos Then Begin
         ItemValue := HTMLValues2(HTML, 'Aspect Ratio', '</ul>', '<li role="presentation" class="ipc-inline-list__item">', '</li>', '   ', EndPos);  //'<br><br>'
         ItemValue1 := ItemValue;
         //LogMessage('Function ParsePage_IMDBMovieTECHNICAL      Getting result initial ItemValue1 := ItemValue: ' + ItemValue + ' | |');
         ItemValue := StringReplace(ItemValue, '   ', #13, True, False, True);
         ItemValue := StringReplace(ItemValue, '(', ' (', True, False, True);
         If ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieTECHNICAL      Getting result ItemValue for the ~features~: ' + ItemValue + ' | |');
         if ItemValue <> '' then ItemList := ItemList + 'Aspect Ratio' + '<br>' + ItemValue + '<br><br>';
         ItemValue1 := StringReplace(ItemValue1, '/ (high definition)', ' HD', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, 'widescreen', 'WideScreen', True, False, True);
         (* //instead of this, I provided snippet that depends on ":" and not on AR, because in the existing snippet there are many ARs that are missing.
         ItemValue1 := StringReplace(ItemValue1, '16:9 HD', '16 : 9  HD', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, '4:3', '4 : 3', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, '2.55: 1', '2.55 : 1', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, '2.39: 1', '2.39 : 1', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, '2.40:1', '2.40 : 1', True, False, True);
         //*)
         ResultText := '';
         i := 1;

         While i <= Length(ItemValue1) Do Begin
            If ItemValue1 = ':' Then Begin
               // Check for spaces before and after the colon
               If (i > 1) And (ItemValue1[i-1] <> ' ') Then
               ResultText := ResultText + ' ';
               ResultText := ResultText + ':';
               If (i < Length(ItemValue1)) And (ItemValue1[i+1] <> ' ') Then
               ResultText := ResultText + ' ';
            End Else
            ResultText := ResultText + ItemValue1;
            i := i + 1;
         End;

         ItemValue1 := ResultText;
         //LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      ResultText: ' + ItemValue1 + ' | |');

         //ItemValue1 := StringReplace(ItemValue1, '1(', '1, (', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, '1(', '1 (', True, False, True);
         ItemValue1 := StringReplace(ItemValue1, ')   ', '), ', True, False, True);
         //LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      ItemValue1: ' + ItemValue1 + ' | |');
         
         // Initialize ItemValue3 to get ARs without descriptions
         ItemValue3 := '';
         ExplodeString(ItemValue1, ItemArray, ',');
         // Iterate through the array and extract only aspect ratios
         For i := 0 To High(ItemArray) Do Begin
            ItemArray := Trim(ItemArray);
            // Check if the entry contains an aspect ratio
            If Pos(':', ItemArray) > 0 Then Begin
               // Remove any parenthesis and their content
               ItemArray := Copy(ItemArray, 1, Pos('(', ItemArray) - 1);
               // Trim any trailing spaces
               ItemArray := Trim(ItemArray);
               // Append to ItemValue3
               If ItemValue3 <> '' Then
                  ItemValue3 := ItemValue3 + ', ';
                  ItemValue3 := ItemValue3 + ItemArray;
            End;
         End;
         //LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      ItemValue3 (Aspect Ratios only): ' + ItemValue3 + ' | |');

         if ItemValue <> '' then AddCustomFieldValueByName('Imdb_Aspect Ratio', StringReplace(RemoveTagsEx0(ItemValue1),'   ',',  ',True,False,True));   //As memo field, ARs with the description each as a comma separated list.
         if ItemValue <> '' then AddCustomFieldValueByName('Imdb Aspect Ratio', RemoveTagsEx0(ItemValue3));   //As memo field, ARs without the description as comma separated list.-------
         if ItemValue3 = '' then AddCustomFieldValueByName('Imdb Aspect Ratio', RemoveTagsEx0(ItemValue1));   //As memo field, ARs without the description as comma separated list.-------
         if ItemValue <> '' then AddCustomFieldValueByName('Aspect Ratio', ItemValue);   //As multiselect list field, ARs with the description each in separate line.
         if ItemValue1 <> '' then LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      ItemValue, ItemValue1 and ItemValue3 are added to a memo and multiselect list');
         //LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      ItemValue, ItemValue1 and ItemValue3 that are added to a memo and multiselect list):' + #13#10 + #13#10 + 'ItemValue added as:' + #13#10 + '---------' + #13#10 + ItemValue + ' | |' + #13#10 + #13#10 + 'ItemValue1 added as' + #13#10 + '---------' + #13#10 + ItemValue1 + ' | |' + #13#10 + #13#10 + 'ItemValue3 added as' + #13#10 + '---------' + #13#10 + ItemValue3 + ' | |' + #13#10);
      End;

Quote
      //Write to ~features~ and (CF~ImdbTechSpecs~) fields
      if (Length(ItemList)>0) then begin
         AddFieldValueXML('features', ItemList);
         AddCustomFieldValueByName('ImdbTechSpecs', ItemList); //Ivek23 CustomField ~ImdbTechSpecs~ for ~features~
         //LogMessage('Function ParsePage_IMDBMovieTECHNICAL -      Added result Movie ~features~ and (CF~ImdbTechSpecs~): ' + ItemList + ' | |');
      End;
     End;

Quote
   //if (ItemValue2 = '') AND (ItemValue00 <> '') then AddFieldValueXML('length', IntToStr(60*StrToInt(ItemValue0)));
   if (ItemValue2 <> '') AND (ItemValue = '') then AddFieldValueXML('length', IntToStr(60*StrToInt(ItemValue2)));
   if (ItemValue2 <> '') AND (ItemValue0 <> '') then AddFieldValueXML('length', IntToStr(60*StrToInt(ItemValue0)));
   if (ItemValue2 = '') AND (ItemValue0 <> '') then AddCustomFieldValueByName('Run time', ItemValue0);
   if (ItemValue2 <> '') AND (ItemValue0 = '') then AddCustomFieldValueByName('Run time', ItemValue2);
   if (ItemValue2 <> '') AND (ItemValue0 <> '') then AddCustomFieldValueByName('Run time', ItemValue0);
                     
   
    LogMessage('Function ParsePage_IMDBMovieTECHNICAL END=====================| |');
  End; //BlockClose
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 31, 2025, 10:08:52 am

Function ParsePage_IMDBMovieAWARDS

Minor code correction.

Quote
        // Extract category
        //categoryPos := PosFrom('<span class="ipc-metadata-list-summary-item__li awardCategoryName" aria-disabled="false">', Award, 1);
        categoryPos := PosFrom('<span class="ipc-metadata-list-summary-item__li awardCategoryName ipc-btn--not-interactable" aria-disabled="false">', Award, 1);
        If categoryPos > 0 Then Begin
         categoryPos := PosFrom('>', Award, categoryPos) + 1;
         endPos := PosFrom('</span>', Award, categoryPos);
         Category := Copy(Award, categoryPos, endPos - categoryPos);
         LogMessage('Function ParsePage_IMDBMovieAWARDS - Parsed Category: ' + Category);
        End Else Begin
         LogMessage('Function ParsePage_IMDBMovieAWARDS - Category tag not found');
         Category := '';
        End;
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on March 31, 2025, 10:28:16 am

ParsePage_IMDBMovieCONNECTIONS

Minor code correction.

Quote
            // Format the category link
            Category1 := Category1 + '<link url="' + MovieURL + optionValue + '">' + categoryName + '</link>   •   ';
            //LogMessage('Function ParsePage_IMDBMovieCONNECTIONS - Formatted and added category link: ' + '<link url="' + MovieURL + optionValue + '">' + categoryName + '   •   </link>');
            
            // Move to the next position
            curPos := PosFrom('</option>', Category2, curPos) + Length('</option>');
            //LogMessage('Function ParsePage_IMDBMovieCONNECTIONS - Moved curPos to next option tag: ' + IntToStr(curPos));
         End;
         
         // Remove the trailing "   •   " if it exists and keep the last </link> intact
         If Copy(Category1, Length(Category1) - 13, 7) = '   •   ' Then
         Begin
            Category1 := Copy(Category1, 1, Length(Category1) - 14) + '</link>';
            //LogMessage('Function ParsePage_IMDBMovieCONNECTIONS - Removed trailing "   •   " and kept last </link> in Category1');
         End;
         
         //LogMessage('Function ParsePage_IMDBMovieCONNECTIONS - Final Category1 before combining: ' + Category1);
         
         // Combine and format the final result
         Category1 := '<link url="' + MovieURL + '">Connections:</link>                               ' + Category1;
         //LogMessage('Function ParsePage_IMDBMovieCONNECTIONS - Combined and formatted final Category1: ' + Category1);
         
         // Store the result in the custom field
Quote
         // Combine and format the final result
         if Category1 <> '' then
         Category1 := '<link url="' + MovieURL + '">Connections:</link>     •     ' + Category1
         Else
         Category1 := '<link url="' + MovieURL + '">Connections:</link>          ' + Category1;;
         //LogMessage('Function ParsePage_IMDBMovieCONNECTIONS - Combined and formatted final Category1: ' + Category1);


Function ParsePage_IMDBMovieCRITICREVIEWS

Minor code correction.

Quote
   //Get ~Metascore~
      EndPos := Pos('</span></span><span class="label"><span class="metacritic-score-label">Metascore</span></span></span></a></li></ul>', HTML);
      if EndPos>0 then begin
         curPos := PrevPos('">', HTML, EndPos) + Length('">');
         EndPos := PosFrom('</span></span><span class="label"><span class="metacritic-score-label">Metascore</span></span></span></a></li></ul>', HTML, curPos) + 2;
         //ItemValue := RemoveTags(Copy(HTML, curPos, endPos-curPos), false);
         ItemValue := Copy(HTML, curPos, endPos-curPos);
         LogMessage('Function ParsePage_IMDBMovieCRITICREVIEWS -      Get result Metascore original: ' + ItemValue + ' | |');
         ItemValue := CustomStringReplace(ItemValue, ['0</', '1</', '2</', '3</', '4</', '5</', '6</', '7</', '8</', '9</'], [',0', ',1', ',2', ',3', ',4', ',5', ',6', ',7', ',8', ',9']);
         //curPos := Pos('var ue_t0=ue_t0', ItemValue);                               //WEB_SPECIFIC.
         //If 0<curPos then ItemValue := Copy(ItemValue, 0, curPos-1);
         if ItemValue <> '' then AddCustomFieldValueByName('Metascore', FloatToStr((StrToFloat(ItemValue) * 1)));
         if ItemValue <> '' then LogMessage('Function ParsePage_IMDBMovieCRITICREVIEWS -      Get result Metascore in PVD format (CF~Metascore~): ' + ItemValue + ' | |');
      End;
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 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;
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 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.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist 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
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 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
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist 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.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on April 27, 2025, 05:45:43 pm
According to your picture, you need to confirm the "try again" button so that it will continue downloading files to the Program Folder/Scripts/Tmp folder. Or it will then finish downloading data for a specific movie.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on April 28, 2025, 07:03:05 am
According to your picture, you need to confirm the "try again" button so that it will continue downloading files to the Program Folder/Scripts/Tmp folder. Or it will then finish downloading data for a specific movie.
and how many times do I need to press? I pressed it about 20 times. The result is this message each time. After that, will the download from the file in the folder be done into the program itself?

were you talking about these files (screen)?

But, as I understand it, temporary files are created there when the old classic IMDB script is running. And when IMDB-Selenium is running, there is nothing in the folder
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on April 28, 2025, 07:06:07 pm
What is written to the log file, maybe you will see an error there. There is definitely an error somewhere, considering that you have confirmed the "try again" button en masse.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on April 28, 2025, 07:45:43 pm
As far as I can see, you are using IMDB_Movie_[EN][Selenium]-v4, which is missing the updates that are causing these issues.

You should use my updated IMDB_Movies_[EN][Selenium]-v4 script and SeleniumPVDbScriptsConfig-v4.ini file. Maybe then you won't have these issues.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on April 29, 2025, 07:05:43 am
As far as I can see, you are using IMDB_Movie_[EN][Selenium]-v4, which is missing the updates that are causing these issues.

You should use my updated IMDB_Movies_[EN][Selenium]-v4 script and SeleniumPVDbScriptsConfig-v4.ini file. Maybe then you won't have these issues.
where can I find them on the forum? Everything is so scattered now, unfortunately. I took this archive https://www.videodb.info/forum_en/index.php?action=dlattach;topic=4379.0;attach=7415

in the pvd folder there is only one log file - firebird.log. And there is no debug information. There is also log.txt, but it is empty
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 01, 2025, 09:20:19 am
Scripts-2025-03-23.7z

https://www.videodb.info/forum_en/index.php?action=dlattach;topic=4379.0;attach=7427

This is described a few posts above

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
other archives are obtained.

Scripts_9-4-25_by_Ivek.7z

https://www.videodb.info/forum_en/index.php?action=dlattach;topic=4385.0;attach=7432

PVD must be running in debug mode, otherwise the log file is empty and add this below to the portable.bat file.
Quote
start viddb.exe -portable -debug
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 01, 2025, 12:28:16 pm
Scripts-2025-03-23.7z

https://www.videodb.info/forum_en/index.php?action=dlattach;topic=4379.0;attach=7427

This is described a few posts above

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
other archives are obtained.

Scripts_9-4-25_by_Ivek.7z

https://www.videodb.info/forum_en/index.php?action=dlattach;topic=4385.0;attach=7432

PVD must be running in debug mode, otherwise the log file is empty and add this below to the portable.bat file.
Quote
start viddb.exe -portable -debug
installed. This message still appears and the information is not loaded.
log file attached.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 01, 2025, 04:44:28 pm
I can see from the log file that there is no internet connection, which is why it is not transferring any information to you.

Below is the Scripts - What scripts do you need file, which has all the necessary folders and files that you must have in the Scripts folder of the PVD program, except for the chromedriver.exe file, which can be found at the links below in the quote section.

Quote
Chromedriver:
1. chromedriver   win32   https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win32/chromedriver-win32.zip (https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win32/chromedriver-win32.zip)
2. chromedriver   win64   https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win64/chromedriver-win64.zip (https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win64/chromedriver-win64.zip)

Unzip the Scripts - What scripts do you need file and then check if you also have all the files in your folder at D:\Game\pvd\Scripts\ plus the chromedriver.exe file. If you are missing something, first make a copy of the original Scripts folder, then add the missing files to the original Scripts folder or copy the entire Scripts folder from the Scripts - What scripts do you need file. Then you will see if it works for you, because for me it normally transfers all the information to the PVD database.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 02, 2025, 10:33:10 am
I can see from the log file that there is no internet connection, which is why it is not transferring any information to you.

Below is the Scripts - What scripts do you need file, which has all the necessary folders and files that you must have in the Scripts folder of the PVD program, except for the chromedriver.exe file, which can be found at the links below in the quote section.

Quote
Chromedriver:
1. chromedriver   win32   https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win32/chromedriver-win32.zip (https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win32/chromedriver-win32.zip)
2. chromedriver   win64   https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win64/chromedriver-win64.zip (https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win64/chromedriver-win64.zip)

Unzip the Scripts - What scripts do you need file and then check if you also have all the files in your folder at D:\Game\pvd\Scripts\ plus the chromedriver.exe file. If you are missing something, first make a copy of the original Scripts folder, then add the missing files to the original Scripts folder or copy the entire Scripts folder from the Scripts - What scripts do you need file. Then you will see if it works for you, because for me it normally transfers all the information to the PVD database.
should the file "chromedriver.exe" also be in the folder "\pvd\Scripts\"?

Tried to copy "chromedriver.exe" both to the SCRIPT folder and to the root of the PVD folder - no difference. Information is not imported. Plus - deleted all old scripts and left only selenium files. Information is not imported. And a constant message (screenshot)
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 02, 2025, 01:08:56 pm
should the file "chromedriver.exe" also be in the folder "\pvd\Scripts\"?

Yes, it must be, otherwise it won't work.

You have Google Chrome and Python installed on your computer. If you don't have it, install it, otherwise you have a problem somewhere else on your computer that is not allowing you to download information from the IMDb site. Maybe there are some settings or something else that is blocking you from downloading information from the IMDb site.

Do you see any python script txt log files in the Scripts\Tmp folder.

Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 02, 2025, 04:46:13 pm
should the file "chromedriver.exe" also be in the folder "\pvd\Scripts\"?

Yes, it must be, otherwise it won't work.

You have Google Chrome and Python installed on your computer. If you don't have it, install it, otherwise you have a problem somewhere else on your computer that is not allowing you to download information from the IMDb site. Maybe there are some settings or something else that is blocking you from downloading information from the IMDb site.

Do you see any python script txt log files in the Scripts\Tmp folder.

What version (source) of Python do you recommend? So that there is nothing extra.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 03, 2025, 06:56:17 am
What version (source) of Python do you recommend? So that there is nothing extra.

One of the ones listed below, it is best to use Python 3.12.10.

Python 3.13.3, 3.12.10, 3.11.12

I am using Python 3.13.3 and it works great.

Also read this Python (+Selenium) Chrome general script (https://www.videodb.info/forum_en/index.php/topic,4364.0.html) topic for help.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 03, 2025, 07:32:45 am
What version (source) of Python do you recommend? So that there is nothing extra.

One of the ones listed below, it is best to use Python 3.12.10.

Python 3.13.3, 3.12.10, 3.11.12

I am using Python 3.13.3 and it works great.

Also read this Python (+Selenium) Chrome general script (https://www.videodb.info/forum_en/index.php/topic,4364.0.html) topic for help.
Sorry, but this is a dark forest for me. Install Chrome and Python - yes, I can. Copy scripts - I can too. But I can't edit the paths in the scripts myself. I can't even figure out what to do with selenium_script-Chrome.py. Just copy it to the \pvd\Scripts\ folder? Maybe it's possible to put EVERYTHING you need into one package, so that it's already in the archive in the right folders?

Besides, I can't figure it out. Do I need to do any other manipulations with these scripts after or before running PVD? Or, if everything is already installed and all the paths are specified, then the information is downloaded as usual? I ran PVD, selected a movie, ran the import script...

if possible, describe this line point by point
FileExecute ('pythonw.exe', '"' + ScriptPath + 'selenium_script-Chrome.py" "' + URL + '" "' + ScriptPath + BASE_DOWNLOAD_FILE_NO_BOM + '"');

1, Here is my path to "python" c:\Users\хххх\AppData\Local\Programs\Python\Python313\pythonw.exe"
2, My path to "chromedriver.exe" and to "selenium_script-Chrome.py"
e:\Film\!PersonalVideoDB\Scripts\
What will the fully specified path look like in my case, in which file should it be specified and on which line of this file?

HELP! HELP! HELP!!!  :'(
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 03, 2025, 03:36:17 pm
Sorry, but this is a dark forest for me. Install Chrome and Python - yes, I can. Copy scripts - I can too. But I can't edit the paths in the scripts myself. I can't even figure out what to do with selenium_script-Chrome.py. Just copy it to the \pvd\Scripts\ folder? Maybe it's possible to put EVERYTHING you need into one package, so that it's already in the archive in the right folders?

Since I have already described and added the complete Scripts - What scripts do you need package you need, you do not need this selenium_script-Chrome.py script now. 
I can see from the log file that there is no internet connection, which is why it is not transferring any information to you.

Below is the Scripts - What scripts do you need file, which has all the necessary folders and files that you must have in the Scripts folder of the PVD program, except for the chromedriver.exe file, which can be found at the links below in the quote section.

Quote
Chromedriver:
1. chromedriver   win32   https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win32/chromedriver-win32.zip (https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win32/chromedriver-win32.zip)
2. chromedriver   win64   https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win64/chromedriver-win64.zip (https://storage.googleapis.com/chrome-for-testing-public/134.0.6998.88/win64/chromedriver-win64.zip)

Unzip the Scripts - What scripts do you need file and then check if you also have all the files in your folder at D:\Game\pvd\Scripts\ plus the chromedriver.exe file. If you are missing something, first make a copy of the original Scripts folder, then add the missing files to the original Scripts folder or copy the entire Scripts folder from the Scripts - What scripts do you need file. Then you will see if it works for you, because for me it normally transfers all the information to the PVD database.
  Only chromedriver.exe (size around 18 mb) is missing in the complete package, because otherwise it is not possible to edit the complete package. Scripts - What scripts do you need file plus the chromedriver.exe file copy to e:\Film\!PersonalVideoDB\ path


Besides, I can't figure it out. Do I need to do any other manipulations with these scripts after or before running PVD? Or, if everything is already installed and all the paths are specified, then the information is downloaded as usual? I ran PVD, selected a movie, ran the import script...

No, you don't need any other manipulation because everything is sorted. In your case, there was nothing because you didn't have the right scripts. Once everything is installed and all paths are defined, the data will be transferred as usual, but with a slightly longer data transfer time.



if possible, describe this line point by point
FileExecute ('pythonw.exe', '"' + ScriptPath + 'selenium_script-Chrome.py" "' + URL + '" "' + ScriptPath + BASE_DOWNLOAD_FILE_NO_BOM + '"');

Za vsak v4.py script je že določena pot
652 / 5.000
For each _v4.py script, there is already a path to IMDB_Movies_[EN][Selenium]-v4.psf for each Selenium_Chrome script. This should not be changed, otherwise the scripts will not work. Everything listed in this line will start working when you run the IMDB_Movies_[EN][Selenium]-v4.psf script and pythonw.exe will start and then all IMDb websites listed in the IMDB_Movies_[EN][Selenium]-v4.psf script will start downloading (BASE_DOWNLOAD_FILE_NO_BOM and similar files). After all these files are downloaded to your e:\Film\!PersonalVideoDB\Scripts\Tmp\ path, the downloaded information for a specific movie will be added to your PVD database.


1, Here is my path to "python" c:\Users\хххх\AppData\Local\Programs\Python\Python313\pythonw.exe"

pythonw.exe will automatically start when the IMDB_Movies_[EN][Selenium]-v4.psf script is run.

2, My path to "chromedriver.exe" and to "selenium_script-Chrome.py"
e:\Film\!PersonalVideoDB\Scripts\
What will the fully specified path look like in my case, in which file should it be specified and on which line of this file?

Also nowhere, because the e:\Film\!PersonalVideoDB\Scripts\ path will be automatically detected when the IMDB_Movies_[EN][Selenium]-v4.psf script is there and will run. But you must have the Scripts folder copied from the Scripts - What scripts do you need file with all the files in it plus the chromedriver.exe file there.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 03, 2025, 04:45:17 pm
ok. Python is installed. Chrome (latest version) is present. All Selenium scripts are present. I don't need to register anything additionally myself. Then why is there always the same message and a complete lack of information? Why aren't there even temporary swap files in the \Scripts\Tmp\ folder. Although they are present when using NON-Selenium scripts. I even tried to turn on VPN due to the peculiarities of the Internet in the country. Zero...  ??? ??? ??? ???
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 03, 2025, 04:52:27 pm
ok. Python is installed. Chrome (latest version) is present. All Selenium scripts are present. I don't need to register anything additionally myself. Then why is there always the same message and a complete lack of information? Why aren't there even temporary swap files in the \Scripts\Tmp\ folder. Although they are present when using NON-Selenium scripts. I even tried to turn on VPN due to the peculiarities of the Internet in the country. Zero...  ??? ??? ??? ???
Can I send you an archive of my PVD (without a database)? 40 Mb...
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 03, 2025, 07:09:28 pm
ok. Python is installed. Chrome (latest version) is present. All Selenium scripts are present. I don't need to register anything additionally myself. Then why is there always the same message and a complete lack of information? Why aren't there even temporary swap files in the \Scripts\Tmp\ folder. Although they are present when using NON-Selenium scripts. I even tried to turn on VPN due to the peculiarities of the Internet in the country. Zero...  ??? ??? ??? ???
Can I send you an archive of my PVD (without a database)? 40 Mb...

Yes, you can send it to this email address below.

ivan.rupnik@amis.net
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 04, 2025, 08:25:08 am
ok. Python is installed. Chrome (latest version) is present. All Selenium scripts are present. I don't need to register anything additionally myself. Then why is there always the same message and a complete lack of information? Why aren't there even temporary swap files in the \Scripts\Tmp\ folder. Although they are present when using NON-Selenium scripts. I even tried to turn on VPN due to the peculiarities of the Internet in the country. Zero...  ??? ??? ??? ???
Can I send you an archive of my PVD (without a database)? 40 Mb...

Yes, you can send it to this email address below.

ivan.rupnik@amis.net
Sent. By the way, should chrome be the default browser on a computer? I have a different main browser.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 04, 2025, 12:04:39 pm
No, it's not necessary, my default browser is Mozilla Firefox.

Yes, I received your !PersonalVideoDB program by email.

By the way, I tested your !PersonalVideoDB program a little, it works for certain movies, but it doesn't work for the movie Al Final Del Túnel. We'll see what's wrong here, because on my test PVD with chromedriver it works and transfers the information to the database.

After I do some more tests, I'll send you back a tested version of your !PersonalVideoDB program.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 04, 2025, 01:51:28 pm
No, it's not necessary, my default browser is Mozilla Firefox.

Yes, I received your !PersonalVideoDB program by email.

By the way, I tested your !PersonalVideoDB program a little, it works for certain movies, but it doesn't work for the movie Al Final Del Túnel. We'll see what's wrong here, because on my test PVD with chromedriver it works and transfers the information to the database.

After I do some more tests, I'll send you back a tested version of your !PersonalVideoDB program.
Thank You!!
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 05, 2025, 04:51:18 pm
I am sending you !PersonalVideoDB, which is updated to the latest PVD 1.0.2.7 MOD version. The new updated !PersonalVideoDB is now in portable debug version, so now run it with portable.bat file and the log file will have all the data about the operation, as in the currently attached log file. All redundant files are attached in the (Nova mapa) New Folder files, in case you need them.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 06, 2025, 03:54:24 pm
I am sending you !PersonalVideoDB, which is updated to the latest PVD 1.0.2.7 MOD version. The new updated !PersonalVideoDB is now in portable debug version, so now run it with portable.bat file and the log file will have all the data about the operation, as in the currently attached log file. All redundant files are attached in the (Nova mapa) New Folder files, in case you need them.
Unfortunately, the result is the same. If I understood correctly, then during the import of information in the TMP folder, temporary files should be created. But they are not there. Neither during the operation of the PVD, nor after. I launched the PVD with administrator rights, disabled the antivirus. Nothing helps.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 06, 2025, 05:47:13 pm
Did you run portable.bat, which runs in debug mode in the program folder and what is written in the log file.

Quote
A. You installed python
You installed Python, that's ok.

Quote
B. You installed selenium by
Run cmd as administrator and then enter the following
Quote
pip install selenium
to install selenium for you and then enter the rest, to update to the latest version, if necessary.

If it still doesn't work, the problem is somewhere else.  I don't know how else to help, unfortunately.

It works without problems on Win10 64 bit for me.

Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 06, 2025, 06:36:51 pm
Did you run portable.bat, which runs in debug mode in the program folder and what is written in the log file.

Quote
A. You installed python
You installed Python, that's ok.

Quote
B. You installed selenium by
Run cmd as administrator and then enter the following
Quote
pip install selenium
to install selenium for you and then enter the rest, to update to the latest version, if necessary.

If it still doesn't work, the problem is somewhere else.  I don't know how else to help, unfortunately.

It works without problems on Win10 64 bit for me.
no. it doesn't work...  :'( :'( :'( :'(
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 08, 2025, 08:31:52 am
Quote
(06.05.2025 20:30:28) Function GetDownloadURL -      IMDB URL.
(06.05.2025 20:30:28) Function GetDownloadURL -      Mode=smSearch: Parse stored information DownloadURL: https://www.imdb.com/title/tt1543920/ | |
(06.05.2025 20:30:28) Function GetDownloadURL END====================== with Mode=1 (smNormal) with Result=D:\!PersonalVideoDB\Scripts\BE_PATIENT_PLEASE-DOWNLOADING_DATA |
(06.05.2025 20:30:28) Searching movie information for: Return, The
(06.05.2025 20:30:28) Function ParsePage: Starting processing.
(06.05.2025 20:30:28) Function ParsePage - HTML length: 34
(06.05.2025 20:30:28) Function ParsePage BEGIN====================== |
(06.05.2025 20:30:28) Function ParsePage - Global Var: Mode|1 |
(06.05.2025 20:30:28) Function ParsePage - Global Var: DownloadURL| https://www.imdb.com/title/tt1543920/ |
(
Even searching for the movie title is not correct, as you can see below.
Quote
(8.05.2025 08:35:14) Function GetDownloadURL -      IMDB URL.
(8.05.2025 08:35:14) Function GetDownloadURL -      Mode=smSearch: Parse stored information DownloadURL: https://www.imdb.com/title/tt1543920/ | |
(8.05.2025 08:35:14) Function GetDownloadURL END====================== with Mode=1 (smNormal) with Result=D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\BE_PATIENT_PLEASE-DOWNLOADING_DATA |
(8.05.2025 08:35:14) Searching movie information for: Turtles Forever
(8.05.2025 08:35:14) Function ParsePage: Starting processing.
(8.05.2025 08:35:14) Function ParsePage - HTML length: 34
(8.05.2025 08:35:14) Function ParsePage BEGIN====================== |
(8.05.2025 08:35:14) Function ParsePage - Global Var: Mode|1 |
(8.05.2025 08:35:14) Function ParsePage - Global Var: DownloadURL| https://www.imdb.com/title/tt1543920/ |
(8.05.2025 08:35:14) Function ParsePage - Local Var: URL|  |


Quote
(06.05.2025 20:30:28) Function GetPvdConfigOptions - completed.
(06.05.2025 20:30:28)       Function DownloadPage -      Download attempt with Selenium in file:| D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main page: |https://www.imdb.com/title/tt1543920/ | |
(06.05.2025 20:30:28)       Function DownloadPage -      Download started with Selenium in file:| D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main Page: |https://www.imdb.com/title/tt1543920/ | |
(06.05.2025 20:30:28)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:30:38)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:30:48)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:30:58)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:08)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:18)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:45)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:55)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:05)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:15)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:25)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:35)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:47)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:57)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:07)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:17)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:27)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:37)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:52)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:02)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:12)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:22)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:32)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:42)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:53)       Function DownloadPage ENDED for MainPage with NO INTERNET connection =============== |

Here, it reports an error that you don't have an internet connection. This means that the Selenium_Chrome_Base_page_v4.py script does not allow you to continue downloading the downpage-UTF8_NO_BOM.htm file. Apparently, the problem is possible in Win7 or you have blocked access to download information from the Imdb page or in the Selenium_Chrome_Base_page_v4.py script itself, where something is written in the Selenium_Chrome_Base_page_v4.py script code that blocks you from continuing the download process of the entire source code of the IMDb base page.

For me, it continues normally, as you can see below.
Quote
(8.05.2025 08:35:15) Function GetPvdConfigOptions - completed.
(8.05.2025 08:35:15)       Function DownloadPage -      Download attempt with Selenium in file:| D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main page: |https://www.imdb.com/title/tt1543920/ | |
(8.05.2025 08:35:15)       Function DownloadPage -      Download started with Selenium in file:| D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main Page: |https://www.imdb.com/title/tt1543920/ | |
(8.05.2025 08:35:15)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:25)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:35)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:45)       Function DownloadPage -      Complete Main page file that is now present: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:45) Function DownloadPage - Value of MainPageDownloaded: True
(8.05.2025 08:35:45) Function DownloadPage - if it's Series there will be MediaType: || or...
(8.05.2025 08:35:45) Function DownloadPage - if it's Series there will be category: Movie||
(8.05.2025 08:35:45) Function DownloadPage - Skipping download for FullCredits page as per configuration.
(8.05.2025 08:35:45) Function DownloadPage - EXCLUDED_FILES: downpage-UTF8_NO_BOM-FullCredits.htm|  |
(



To potentially fix the problem, I would advise you to use, for example, ChatGPT, which uses AI. Perhaps you will be able to solve your problems with PVD with its help.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 11, 2025, 01:04:32 pm
Quote
(06.05.2025 20:30:28) Function GetDownloadURL -      IMDB URL.
(06.05.2025 20:30:28) Function GetDownloadURL -      Mode=smSearch: Parse stored information DownloadURL: https://www.imdb.com/title/tt1543920/ | |
(06.05.2025 20:30:28) Function GetDownloadURL END====================== with Mode=1 (smNormal) with Result=D:\!PersonalVideoDB\Scripts\BE_PATIENT_PLEASE-DOWNLOADING_DATA |
(06.05.2025 20:30:28) Searching movie information for: Return, The
(06.05.2025 20:30:28) Function ParsePage: Starting processing.
(06.05.2025 20:30:28) Function ParsePage - HTML length: 34
(06.05.2025 20:30:28) Function ParsePage BEGIN====================== |
(06.05.2025 20:30:28) Function ParsePage - Global Var: Mode|1 |
(06.05.2025 20:30:28) Function ParsePage - Global Var: DownloadURL| https://www.imdb.com/title/tt1543920/ |
(
Even searching for the movie title is not correct, as you can see below.
Quote
(8.05.2025 08:35:14) Function GetDownloadURL -      IMDB URL.
(8.05.2025 08:35:14) Function GetDownloadURL -      Mode=smSearch: Parse stored information DownloadURL: https://www.imdb.com/title/tt1543920/ | |
(8.05.2025 08:35:14) Function GetDownloadURL END====================== with Mode=1 (smNormal) with Result=D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\BE_PATIENT_PLEASE-DOWNLOADING_DATA |
(8.05.2025 08:35:14) Searching movie information for: Turtles Forever
(8.05.2025 08:35:14) Function ParsePage: Starting processing.
(8.05.2025 08:35:14) Function ParsePage - HTML length: 34
(8.05.2025 08:35:14) Function ParsePage BEGIN====================== |
(8.05.2025 08:35:14) Function ParsePage - Global Var: Mode|1 |
(8.05.2025 08:35:14) Function ParsePage - Global Var: DownloadURL| https://www.imdb.com/title/tt1543920/ |
(8.05.2025 08:35:14) Function ParsePage - Local Var: URL|  |


Quote
(06.05.2025 20:30:28) Function GetPvdConfigOptions - completed.
(06.05.2025 20:30:28)       Function DownloadPage -      Download attempt with Selenium in file:| D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main page: |https://www.imdb.com/title/tt1543920/ | |
(06.05.2025 20:30:28)       Function DownloadPage -      Download started with Selenium in file:| D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main Page: |https://www.imdb.com/title/tt1543920/ | |
(06.05.2025 20:30:28)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:30:38)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:30:48)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:30:58)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:08)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:18)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:45)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:31:55)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:05)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:15)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:25)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:35)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:47)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:32:57)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:07)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:17)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:27)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:37)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:33:52)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:02)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:12)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:22)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:32)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:42)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(06.05.2025 20:34:53)       Function DownloadPage ENDED for MainPage with NO INTERNET connection =============== |

Here, it reports an error that you don't have an internet connection. This means that the Selenium_Chrome_Base_page_v4.py script does not allow you to continue downloading the downpage-UTF8_NO_BOM.htm file. Apparently, the problem is possible in Win7 or you have blocked access to download information from the Imdb page or in the Selenium_Chrome_Base_page_v4.py script itself, where something is written in the Selenium_Chrome_Base_page_v4.py script code that blocks you from continuing the download process of the entire source code of the IMDb base page.

For me, it continues normally, as you can see below.
Quote
(8.05.2025 08:35:15) Function GetPvdConfigOptions - completed.
(8.05.2025 08:35:15)       Function DownloadPage -      Download attempt with Selenium in file:| D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main page: |https://www.imdb.com/title/tt1543920/ | |
(8.05.2025 08:35:15)       Function DownloadPage -      Download started with Selenium in file:| D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm the information of the Main Page: |https://www.imdb.com/title/tt1543920/ | |
(8.05.2025 08:35:15)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:25)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:35)       Function DownloadPage -       Waiting 10s for the presence of the Main page: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:45)       Function DownloadPage -      Complete Main page file that is now present: D:\MyTest-PVD\Pacifist\!PersonalVideoDB\Scripts\Tmp\downpage-UTF8_NO_BOM.htm
(8.05.2025 08:35:45) Function DownloadPage - Value of MainPageDownloaded: True
(8.05.2025 08:35:45) Function DownloadPage - if it's Series there will be MediaType: || or...
(8.05.2025 08:35:45) Function DownloadPage - if it's Series there will be category: Movie||
(8.05.2025 08:35:45) Function DownloadPage - Skipping download for FullCredits page as per configuration.
(8.05.2025 08:35:45) Function DownloadPage - EXCLUDED_FILES: downpage-UTF8_NO_BOM-FullCredits.htm|  |
(



To potentially fix the problem, I would advise you to use, for example, ChatGPT, which uses AI. Perhaps you will be able to solve your problems with PVD with its help.

I have Windows 10. I have added everything possible to the firewall permissions. chromedriver.exe, Python, SeleniumPVDbScriptsConfig-v4.exe, Selenium_Chrome_Base_page_v4.py. I have disabled the antivirus. I have turned VPN on and off. Nothing helps. It is a shame that when using old IMDB scripts, the files downpage-UTF8_NO_BOM.htm and downimage-BIN-Poster.jpg are created. Note: this has never happened with any program. Too bad..... The old IMDB scripts have stopped downloading information in recent months, and the new ones do not work for me. RIP...
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 12, 2025, 07:16:12 am
I have Windows 10. I have added everything possible to the firewall permissions. chromedriver.exe, Python, SeleniumPVDbScriptsConfig-v4.exe, Selenium_Chrome_Base_page_v4.py. I have disabled the antivirus. I have turned VPN on and off. Nothing helps. It is a shame that when using old IMDB scripts, the files downpage-UTF8_NO_BOM.htm and downimage-BIN-Poster.jpg are created. Note: this has never happened with any program. Too bad..... The old IMDB scripts have stopped downloading information in recent months, and the new ones do not work for me. RIP...

Too bad, to hear this.

It's interesting that the old IMDB scripts work for you, but the new versions of IMDb scripts using Python and Selenium unfortunately don't. What's wrong here that the new versions of IMDb scripts don't work for you is hard to say and figure out. The fact is that the new versions of IMDb scripts using Python and Selenium unfortunately don't work for you for certain reasons and the code written in them. It would be necessary to change parts of the code in them, so that then maybe it would work for you. Maybe a solution will be found when the Afrocuban user returns.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 24, 2025, 01:14:17 pm
I think I found the reason why it's not working for you. It's likely that the following Python libraries are not installed.
Quote
pip install requests beautifulsoup4

Do this:
Quote
Open a terminal or command prompt:
On Windows: search for "cmd" or "PowerShell".

Type the following in the command prompt to install the appropriate library:
Quote
pip install requests beautifulsoup4

Once this is installed, it should work. I know this from my own experience on Win11, where it didn't work before, just like you. But when I installed this library, everything worked without problems with Geckodriver, which is added to the same Scripts folder where the scripts are already.

I will also send you a new version of your !PersonalVideoDB program, where everything is already set up to work with Geckodriver.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 26, 2025, 04:05:54 pm
I think I found the reason why it's not working for you. It's likely that the following Python libraries are not installed.
Quote
pip install requests beautifulsoup4

Do this:
Quote
Open a terminal or command prompt:
On Windows: search for "cmd" or "PowerShell".

Type the following in the command prompt to install the appropriate library:
Quote
pip install requests beautifulsoup4

Once this is installed, it should work. I know this from my own experience on Win11, where it didn't work before, just like you. But when I installed this library, everything worked without problems with Geckodriver, which is added to the same Scripts folder where the scripts are already.

I will also send you a new version of your !PersonalVideoDB program, where everything is already set up to work with Geckodriver.
Hi. Hurray, it helped!!!! I pressed REPEAT (sic!) 2-3 times while loading the information and everything loaded. Almost. For some reason the line "Also known as" is empty. Although you have it filled in for the same film. The "Also known as" mark is set in the plugin settings...
Many thanks for the help and resuscitation of PVD!!!!
P.S. And the last question. For today ;-). And for TV series it doesn't work yet?
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on May 26, 2025, 07:26:17 pm
Hi. Hurray, it helped!!!! I pressed REPEAT (sic!) 2-3 times while loading the information and everything loaded. Almost. For some reason the line "Also known as" is empty. Although you have it filled in for the same film. The "Also known as" mark is set in the plugin settings...
Many thanks for the help and resuscitation of PVD!!!!
P.S. And the last question. For today ;-). And for TV series it doesn't work yet?

That was nice to hear and I'm also glad that PVD was able to be revived.

I know about the problem with the "Also known as" information transfer box. Try reloading all the information. If there is still no information, try the refresh button or try another movie file or restart pvd. Maybe then it will be better.

As for the TV series data transfer, the entire E P I S O D E L I S T code is blocked, because at that time there was a problem with the pop-up windows and it was necessary to interrupt the information transfer, leaving empty fields in the database. Where the problem is here, I don't know, because I didn't find anything wrong in the code. Maybe an Afrocuban user will find a way to solve this problem when he comes back.

For now, let's leave it as it is and let's solve any errors and other problems if it possible.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on May 31, 2025, 02:08:00 pm
and it should be that in the Links field not the films are displayed, but a link (pic.1) to the IMDB page (pic. 2)?
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on June 01, 2025, 07:47:38 am
and it should be that in the Links field not the films are displayed, but a link (pic.1) to the IMDB page (pic. 2)?

And what is wrong here in your opinion. I don't see anything wrong here. There should be a link to the Connections website and a list of all areas and the number of hits in one area (as in the attached image9 below). The exception is only one area, where there is only a link to the Connections website.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on June 01, 2025, 08:26:15 am
and it should be that in the Links field not the films are displayed, but a link (pic.1) to the IMDB page (pic. 2)?

And what is wrong here in your opinion. I don't see anything wrong here. There should be a link to the Connections website and a list of all areas and the number of hits in one area (as in the attached image9 below). The exception is only one area, where there is only a link to the Connections website.
In my opinion, the list of films should be expanded there. And not transferred to the browser. As it was before in the main menu of the PVD. This is a big plus. You can immediately see which films from the collection the new product intersects with. Thank you!
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on June 01, 2025, 09:43:20 am
As a note. For some reason, at some point the page with the film stops filling. For example, "Graf Dracula in Oberbayern" (https://www.imdb.com/title/tt0079230/). You can see how the TMP folder is filled in the scripts, but all the fields on its page in the PVD are empty. Even the user ones. And I can't figure out if this is a problem in the program itself (some kind of glitch) or a problem in the script.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on June 01, 2025, 02:07:56 pm
As a note. For some reason, at some point the page with the film stops filling. For example, "Graf Dracula in Oberbayern" (https://www.imdb.com/title/tt0079230/). You can see how the TMP folder is filled in the scripts, but all the fields on its page in the PVD are empty. Even the user ones. And I can't figure out if this is a problem in the program itself (some kind of glitch) or a problem in the script.

I don't understand what's going on. It's obvious that the data is also printed in the log file, but then the script doesn't load it into the database in this case. The error is in the script, but I don't know yet where the errors are. Because I'm testing now, by areas behind the errors.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on June 04, 2025, 02:28:13 pm
As a note. For some reason, at some point the page with the film stops filling. For example, "Graf Dracula in Oberbayern" (https://www.imdb.com/title/tt0079230/). You can see how the TMP folder is filled in the scripts, but all the fields on its page in the PVD are empty. Even the user ones. And I can't figure out if this is a problem in the program itself (some kind of glitch) or a problem in the script.

I don't understand what's going on. It's obvious that the data is also printed in the log file, but then the script doesn't load it into the database in this case. The error is in the script, but I don't know yet where the errors are. Because I'm testing now, by areas behind the errors.

The reason why this movie title does not add any information to the database has been found, because there is no data on Awards and ParentsGuide, which the script should add to the database. The solution is to run the SeleniumPVDbScriptsConfig-v4 script, in which you uncheck the Download Awards page and Download ParentalGuide page boxes, which are located under Limit on number totals. Once you do this, click the description below to restart PVD to restart and load PVD, then run the IMDB_Movies_[EN][Selenium]-v4script again and it will now download all the data and add it to the database.

Once all the data is in the database, you may need to run the script again to add any missing data. Once you get the data into the database, you will run the SeleniumPVDbScriptsConfig-v4 script again and check the Download Awards page and Download ParentalGuide page boxes again so that for the second movie title, where all the pages with data are, it will download all the data and add it to the database, otherwise the same problem may occur again or it will not download all the data from additional web pages

The next time you have similar problems, first click on the Alltopic button on the website to check which pages are blacked out or check if the pages have data and repeat the above-mentioned and described procedure.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on June 08, 2025, 08:37:59 am
Quote
************************
The next time you have similar problems, first click on the Alltopic button on the website to check which pages are blacked out or check if the pages have data and repeat the above-mentioned and described procedure.

Are you talking about these settings in general and the Awards item in particular? Thanks!
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on June 08, 2025, 12:18:51 pm
I suddenly have something strange happening with Selenium. If you take the log file as an example, you can see that instead of a couple dozen kilobytes, this file starts to swell to megabytes.. PWD freezes and does not enter anything into the database. And this is not in any particular movie, but in all that I tried to enter today.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on June 08, 2025, 01:42:44 pm
Quote
************************
The next time you have similar problems, first click on the Alltopic button on the website to check which pages are blacked out or check if the pages have data and repeat the above-mentioned and described procedure.

Are you talking about these settings in general and the Awards item in particular? Thanks!

Not about these, but about these settings, which are in the image added below.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on June 08, 2025, 01:56:18 pm
I suddenly have something strange happening with Selenium. If you take the log file as an example, you can see that instead of a couple dozen kilobytes, this file starts to swell to megabytes.. PWD freezes and does not enter anything into the database. And this is not in any particular movie, but in all that I tried to enter today.

The source code for the UserReviews area has been changed again, which is why this is happening. I will see what can be done about this problem in the next few days.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on June 12, 2025, 05:45:09 pm
movie The Gorge (2025) (https://www.imdb.com/title/tt13654226/). In the Category uploaded this "e - https://www.imdb.com/title/tt13654226/ - https://m.media-amazon.com/images/M/MV5BOTQ5Y2QyYTktYmFmZi00NWJlLWE0MzgtYTA4M2I0". New script installed. Thank you.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on June 14, 2025, 07:00:03 am
movie The Gorge (2025) (https://www.imdb.com/title/tt13654226/). In the Category uploaded this "e - https://www.imdb.com/title/tt13654226/ - https://m.media-amazon.com/images/M/MV5BOTQ5Y2QyYTktYmFmZi00NWJlLWE0MzgtYTA4M2I0". New script installed. Thank you.

Welcome.

Everything transferred normally for me.



The Imdb Reference view has switched to a new, changed web page design, and with it, changes have also been made to the source code of these pages.
Now, however, a problem has arisen, because due to these changes, a lot of information is no longer transferred, because in the script there were many parts of the code linked to the reference pages.

Now, it is necessary to completely rearrange or rewrite both the IMDB_Movie_[EN][Selenium]-v4 and IMDB_Movies_[EN][Selenium]-v4 scripts, or perhaps some others, which requires a lot of time and work. will have to wait for the Afrocuban user to return, because as the author of the scripts he knows the concept of the written scripts best.

He also mentioned that he will wait until the scripts are corrected until the Imdb Reference view web pages switch to the new web page design. When he will return is another question, maybe soon in a few weeks, maybe only in a few months, we will see.


You can see an example of the new design at the link below.

https://www.imdb.com/title/tt0034583/reference
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Pacifist on July 05, 2025, 03:01:45 pm
Lately, information from IMDB is almost not loaded. For example, Nagagutsu o Haita Neko (1969, https://www.imdb.com/title/tt0064714/). And so with most films.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on July 06, 2025, 05:28:46 am
Lately, information from IMDB is almost not loaded. For example, Nagagutsu o Haita Neko (1969, https://www.imdb.com/title/tt0064714/). And so with most films.

I don't know what's going on, because I'm not using any IMDB_Movies_[EN][Selenium]-v4 script versions at the moment. And I won't be using them for quite some time. afrocuban user has been away for quite some time, so he can fix these scripts as best he can, because he knows the design of these scripts. He'll probably be away for quite some time, and the question here is how long it will be before he returns.
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: jondak on September 05, 2025, 03:37:01 pm
Hello Ivek23,

can you tell us what combination of scripts what are you using ?
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on September 06, 2025, 06:58:46 am
Hello Ivek23,

can you tell us what combination of scripts what are you using ?

Since you are in the Python scripts section, you must first have Python and its plugins installed. You can find what and how to install Python in the sticky topics and documentation mentioned above. You also need gecko or chrome driver to run Python scripts.

Then you need the following files, Python scripts and programs listed below in the PVD Scripts folder.

- BE_PATIENT_PLEASE-DOWNLOADING_DATA file

 - NoImage2AvailableForPVD.png
 - NoPhoto2AvailableForPVD.png

 - purge_tmp_files.vbs

 - IMDB_Movies_[EN][Selenium]-v4.psf
 - IMDB_Movies_[EN][Selenium]-v4.bak
 - SeleniumPVDbMovieScriptsConfig-v4.psf
 - SeleniumPVDbPeopleScriptsConfig-v4.psf

 - Selenium_Chrome_Base_page_v4.py
 - Selenium_Chrome_DownloadImage-v4.py
 - Selenium_Chrome_IMDB_Episode_List_page_v4.py
 - Selenium_Chrome_Movie_Additional_pages_v4.py
 - Selenium_Chrome_People_Additional_pages_v4.py
 - Selenium_Chrome_Search-v4.py

 - SeleniumPVDbScriptsConfig-v4.ahk
 - seleniumpvdbscriptsconfig-v4.exe
 - SeleniumPVDbScriptsConfig-v4.ini

 - chromedriver.exe or geckodriver.exe


The above is what you need for PVD and Python scripts to work. Whether this still works is another question, because certain parts of the source code of the IMDb pages have changed.

If you want or use the Firefox browser, let me know, so I can attach Python scripts with Firefox settings and geckodriver.exe .
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: jondak on September 06, 2025, 09:29:45 am
Hello,

i was using the Selenium chrome scripts till they changed the page and they stopped pulling data.

in a previous post you said:


I don't know what's going on, because I'm not using any IMDB_Movies_[EN][Selenium]-v4 script versions at the moment. And I won't be using them for quite some time. afrocuban user has been away for quite some time, so he can fix these scripts as best he can, because he knows the design of these scripts. He'll probably be away for quite some time, and the question here is how long it will be before he returns.

I was asking what scripts you are using to pull data now.


Thank you .
Title: Re: PVD Selenium MOD v4 IMDb Movie Script Confusion
Post by: Ivek23 on September 06, 2025, 10:31:07 am
I was asking what scripts you are using to pull data now.


Thank you .

Sorry, but I'm not currently using any scripts or anything that uses Python to download data. I'm not currently working on PVD, which uses Python scripts to download data from the IMDb websites.

As you mentioned below, which I already wrote a few months ago.

in a previous post you said:


I don't know what's going on, because I'm not using any IMDB_Movies_[EN][Selenium]-v4 script versions at the moment. And I won't be using them for quite some time. afrocuban user has been away for quite some time, so he can fix these scripts as best he can, because he knows the design of these scripts. He'll probably be away for quite some time, and the question here is how long it will be before he returns.