English > Support

Personal Video Database 1.0.2.7 MOD

<< < (36/73) > >>

VVV_Easy_Programing:
Attached temporal Acumulative Scripts Patch date: 2019.02.17 (to copy in PVD folder for overwriting the existing files).

Changelog:
        IMDB_People_[EN][HTTPS]
                 V 1.3.2.0 (17/02/2019) Ivek23: Added saving more infos: Filmography, Alternate Names, etc. Set by default PHOTO-URL-IN-TRANSNAME=False

Notes for Ivek23:
GET_FULL_FILMOGRAPHY parameter is not needed because PVD has it in the 'Set Overwrite Options for the selected plugin'.
I'd tried Alternate Name with Charles Chaplin  https://www.imdb.com/name/nm0000122/ and the script doesn't got it (even looking in the Log window).
If you find the good code, please upload it with next version number 1.3.3.0

Ivek23:

--- Quote from: VVV_Easy_Programing on February 17, 2019, 09:21:28 pm ---Notes for Ivek23:
GET_FULL_FILMOGRAPHY parameter is not needed because PVD has it in the 'Set Overwrite Options for the selected plugin'.
--- End quote ---

Exactly, it's true.


--- Quote from: VVV_Easy_Programing on February 17, 2019, 09:21:28 pm ---Notes for Ivek23:
I'd tried Alternate Name with Charles Chaplin  https://www.imdb.com/name/nm0000122/ and the script doesn't got it (even looking in the Log window).
--- End quote ---

It worked without a problem with me. I added another part of the new code, which also works properly.
The old part of the code that works with me
--- Quote ---   //~Alternate Names~
   curPos:=Pos('<div id="details-akas" class="see-more inline canwrap">',HTML);
   If curPos>0 Then Begin
      EndPos:=curPos;
      ItemValue1:=HTMLValues2(HTML,'<h4 class="inline">Alternate Names:','</div>','</h4>','</div>','<br>',EndPos);
      //ItemValue1:=HTMLValues(HTML,'Alternate Names:','</div>','</h4>','</div>','<br>',EndPos); //
      //ItemValue1:=TextBetween(HTML,'<h4 class="inline">Alternate Names:</h4>','</div>',True,curPos);
      LogMessage('    *    Parse Results AltNames01:'+ItemValue1+'||');
      ItemValue1:=StringReplace(ItemValue1,' | ','<br>',True,False,True);
      //ItemValue1:=StringReplace(ItemValue1,' | ',#13,True,False,True);   
      //if Pos(', ', ItemValue1) = 1 then Delete(ItemValue1,1,2);
      If ItemValue1 <> '' then AddFieldValueXML('AltNames',ItemValue1);
      LogMessage('      Parse Results AltNames02:'+ItemValue1+'||');
   End;
--- End quote ---
The new part of the code, which also works with me
--- Quote ---   //~Alternate Names~
   EndPos:=PosFrom('<div id="details-akas" class="see-more inline canwrap">',HTML,EndPos);
   curPos:=PosFrom('<h4 class="inline">Alternate Names:</h4>',HTML,EndPos);
   EndPos:=PosFrom('</div>',HTML,curPos);
   ItemValue:=TextBetween(HTML,'<h4 class="inline">Alternate Names:</h4>','</div>',True,curPos);
   LogMessage('    *    Parse Results AltNames0:'+ItemValue+'||');
   ItemValue:=StringReplace(ItemValue,' | ','<br>',True,False,True);
   //ItemValue:=StringReplace(ItemValue,' | ',',  ',True,False,True);
   //If Pos(', ',ItemValue) = 1 then Delete(ItemValue,1,2);
   If ItemValue <> '' then AddFieldValueXML('AltNames',ItemValue);
   LogMessage('      Parse Results AltNames:'+ItemValue+'||');
--- End quote ---


--- Quote from: VVV_Easy_Programing on February 17, 2019, 09:21:28 pm ---Notes for Ivek23:
If you find the good code, please upload it with next version number 1.3.3.0
--- End quote ---

A new version of IMDB_People_ [EN] [HTTPS] script will be uploaded in a few days, at least I hope it will. I do not have much time to test IMDB_People_ [EN] [HTTPS] script, if everything works fine because I found some code errors for filmography of people.

VVV_Easy_Programing:
Thank you, Ivek23.
I stay tuned in order to update with it the MOD version.

Ivek23:
IMDB_People_ [EN] [HTTPS] script
    V 1.3.3.0 (01/03/2019)

Some code corrections:

--- Quote ---Function DownloadPage(URL:AnsiString):String; //BlockOpen
//Returns the URL page text. If error returns empty string
  Var
    i:Integer;
    ScriptPath,WebText:String;
    Begin
.
.
.
         i:=i+1;
         If i=INTERNET_TEST_ITERATIONS Then Begin
            if 2=MessageBox('Too many faulty attempts to internet connection.'+Chr(13)+ 'Retry or Cancel?',SCRIPT_NAME,5) then begin
               LogMessage(Chr(9)+Chr(9)+'Function DownloadPage END with NOT INTERNET connection ===============|');
               Result:='';
               Exit;
            End;
            i:=0;
         End;
.
.
.
    if (Pos('405 Method not allowed',Result)>0) then begin  //Banned IP. WEB_SPECIFIC.
        If BYPASS_SILENT Then ShowMessage('The URL has HTTP method problems (405 Method not allowed).'+Chr(13)+'Go to the provider web in order to in order to'+Chr(13)+'find the good page',SCRIPT_NAME);
        LogMessage(Chr(9)+Chr(9)+'      405 Method not allowed|');
        Result:=''; //Fatal error
    End;
    if (Pos('Too many request',Result)>0) then begin  //Banned IP. WEB_SPECIFIC.
        If BYPASS_SILENT Then ShowMessage('The provider has banned your IP (Too many request).'+Chr(13)+'Go to the provider web and resolve the captcha in order to'+Chr(13)+'demostrate you are not a robot',SCRIPT_NAME);
        LogMessage(Chr(9)+Chr(9)+'      Banned IP|');
        Result:=''; //Fatal error
    End;
    LogMessage(Chr(9)+Chr(9)+'Function DownloadPage END======================|');
    exit;
  End; //BlockClose
Function DownloadImage
--- End quote ---

Lots of fixes of Filmography code and added code for Genres links in the Comment box.

--- Quote ---   //Get ~Genre index URL~
   //http://www.imdb.com/filmosearch?sort=moviemeter&explore=genres&role=nm0000122&ref_=nm_ql_flmg_5
   EndPos:=Pos('class="link" ><span class="ghost">by</span> Genre</a>',HTML);
   If endPos>0 Then Begin
      ItemValue0:='<link url="http://www.imdb.com/filmosearch?sort=moviemeter&explore=genres&role='+PersonID+'&ref_=nm_ql_flmg_5">Genres</link>';
      If ItemValue0 <> '' then ItemList:=ItemList+#13+ItemValue0;
      LogMessage('      Parse Results Genre URL:'+ItemValue0+'||');
   End;
--- End quote ---

A new code has also been added to download information for genres in the Genres field.


--- Quote --- //Retreive Data Config
  USE_SAVED_PVDCONFIG  = True ;  //Use the Overwrite Options of the script saved in pvdconf.ini for avoid download not used pages. Remember PVD only save in exit.
  GET_FULL_BIO  = True ;  //Download Biography provider page for retreive the info. Otherwise only the info of the principal movie page.
   GET_FULL_GENRES  = True ;  //Download Genres provider page for retreive the info. Otherwise only the info of the principal movie page.
--- End quote ---

--- Quote ---Function ParsePage_IMDBPeopleGENRES(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If żany big problem? with exit;
    //Retrieve: ~genres~ Genres from "Genres" IMDB section
  Var
    curPos,endPos:Integer;
    ItemValue:String;
  Begin
    LogMessage('Function ParsePage_IMDBPeopleGENRES BEGIN=====================||');       
    Result:=prFinished;  //It will change to prError if any big problem with exit;
   //http://www.imdb.com/filmosearch?sort=moviemeter&explore=genres&role=nm0000122&ref_=nm_ql_flmg_5
   //Get ~Genres~
   If Pos('<strong>Genres</strong>',HTML)>0 Then Begin
      curPos:=Pos('<strong>Genres</strong>',HTML);
      EndPos:=curPos;
      ItemValue:=HTMLValues2(HTML,'<fieldset data-join="and" name="genres">','</fieldset>','<span class="faceter-facet-text">','</span>',', ',EndPos);            
      AddFieldValueXML('genre',ItemValue);    
      curPos:=EndPos;
      LogMessage('      Get result Genres (from People Genres):'+ItemValue+'||');
   End;   
    LogMessage('Function ParsePage_IMDBMovieGENRES END=====================||');
  End; //BlockClose
--- End quote ---

Minor correction also Bio Codes.

IMDB_People_ [EN] [HTTPS] script is attached.

webmasterone:
Hallo
first of all, thanks for this grat job
i discovered it only now
i used pdv in the past, but were passed to "Ant Movie Catalog" when pvd stopped to work corrrectly

i would like to make you 2 question:

1) is there a localized version of PVD in Italian ? if not, is there a way to contribute to create it ?
2) i would like to have the search script work for italian movie (so to add also [IT] language to script, but i don't know what to do.

can you kindly help me ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version