Author Topic: Personal Video Database 1.0.2.7 MOD  (Read 270193 times)

0 Members and 5 Guests are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #280 on: November 01, 2020, 08:37:19 am »
Thanks Ivek! My Cinema field looks the same, as well. Still, I don't get it what's the purpose of Cinema1 field? Can you please explain it, or put a link where it is explained? Thanks in advance!

More info at the link below.

http://www.videodb.info/forum_en/index.php/topic,4134.msg20890.html#msg20890
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #281 on: November 01, 2020, 01:04:14 pm »
IMDB_[EN][HTTPS]_(Cast&Crew) V 1.4.1.5 script

I fixed some bugs in the code section for ParsePage_IMDBMovieCREDIT (Full cast and crew section except Cast section).


Thanks Ivek! My Cinema field looks the same, as well. Still, I don't get it what's the purpose of Cinema1 field? Can you please explain it, or put a link where it is explained? Thanks in advance!

More info at the link below.

http://www.videodb.info/forum_en/index.php/topic,4134.msg20890.html#msg20890

In the Cinema1 custom box, there are only a list of records of the areas, what all was involved in the exact specific movie, series and so on. Here, this list is just for the purpose of what the areas are, but there are no names or links here like in the Custom Cinema box.

IMDB_[EN][HTTPS]_(Cast&Crew) script is attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #282 on: November 01, 2020, 02:39:35 pm »
Thank you Ivek. You posted corrected script just before I clicked submit my post on old script importing results. I have now used corrected IMDB_[EN][HTTPS]_(Cast&Crew).psf and change the code as follows:
Code: [Select]
//GET_CREW_CREDIT  = True ;  //Download Cast and Credit provider page for retreive the some credits (crew) info. Otherwise set to False to only the Directors, Writers, Composers, Producers, Cinematography and Thanks info of the Cast and Credit provider page. 
  GET_CREW_CREDIT  = True ;  //Download Cast and Credit provider page for retreive the some credits (crew) info. Otherwise set to False to only the Directors, Writers, Composers, Producers, Cinematography and Thanks info of the Cast and Credit provider page.
  GET_FULL_CREW_CREDIT  = True ;  //Download Cast and Credit provider page for retreive the more  some credits (crew) info. Otherwise set to False to only the Directors, Writers, Composers, Producers and Cinematography + (GET_CREW_CREDIT = True) info of the Cast and Credit provider page.

Now I get it that actually this field isn't for full credits as seen on original IMDb page. Names are imported in Cinema field, and Cinema1 shows all possible fields which can be imported to Cinema, as I understand.

Still, while tested for http://www.imdb.com/title/tt0058672/fullcredits these names are missing from Cinema field, and occupations are stated in Cinema1 field, or it is somehow limited

Quote
Camera and Electrical Department
Philippe Brun   ...   cameraman: second unit
René Chabal   ...   assistant cameraman (as Rene Chabal)
Gilbert Chain   ...   cameraman
Roger Corbeau   ...   stillsman
Max Lechevallier   ...   assistant cameraman
Raymond Picon-Borel   ...   cameraman: second unit

Costume and Wardrobe Department
Theoni V. Aldredge   ...   costumes (as Denny Vachlioti)

Editorial Department
Patrick Clement-Bayard   ...   editor assistant
Johnny Dwyre   ...   editor assistant
Daniele Grimberg   ...   editor assistant (as Danielle Grimberg)

Additional Crew
Jean Fouchet   ...   main title
Lucie Lichtig   ...   script

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #283 on: November 01, 2020, 03:42:05 pm »
Quote
  //GET_CREW_CREDIT  = False ;  //Download Cast and Credit provider page for retreive the some credits (crew) info. Otherwise set to False to only the Directors, Writers, Composers, Producers, Cinematography and Thanks info of the Cast and Credit provider page. 
  GET_CREW_CREDIT  = True ;  //Download Cast and Credit provider page for retreive the some credits (crew) info. Otherwise set to False to only the Directors, Writers, Composers, Producers, Cinematography and Thanks info of the Cast and Credit provider page.
  GET_FULL_CREW_CREDIT  = True ;  //Download Cast and Credit provider page for retreive the more  some credits (crew) info. Otherwise set to False to only the Directors, Writers, Composers, Producers and Cinematography + (GET_CREW_CREDIT = True) info of the Cast and Credit provider page.

Leave it as it is here. Twice you have the GET_CREW_CREDIT option to make it easier to select the option you just need or want to use (once False, which is blocked, and True, which is not already blocked).

Now I get it that actually this field isn't for full credits as seen on original IMDb page. Names are imported in Cinema field, and Cinema1 shows all possible fields which can be imported to Cinema, as I understand.

Hold this and you are also thinking in the right direction.

Quote
Camera and Electrical Department
Philippe Brun   ...   cameraman: second unit
René Chabal   ...   assistant cameraman (as Rene Chabal)
Gilbert Chain   ...   cameraman
Roger Corbeau   ...   stillsman
Max Lechevallier   ...   assistant cameraman
Raymond Picon-Borel   ...   cameraman: second unit

Costume and Wardrobe Department
Theoni V. Aldredge   ...   costumes (as Denny Vachlioti)

Editorial Department
Patrick Clement-Bayard   ...   editor assistant
Johnny Dwyre   ...   editor assistant
Daniele Grimberg   ...   editor assistant (as Danielle Grimberg)

Additional Crew
Jean Fouchet   ...   main title
Lucie Lichtig   ...   script

There really isn't that, because there is no code in the script at all. It kind of made sense to me to just add this below.
Quote
  5. Cast & Crew field info names:   
   •   Directed by
   •   Writing Credits  // NO (WGA)
   •   Cast (in credits order)  // Only data info in normal Actors field
   •   Produced by
   •   Music by
   •   Cinematography by
   •   Film Editing by
   •   Casting By
   •   Production Design by
   •   Art Direction by
   •   Set Decoration by
   •   Costume Design by
   •   Production Management
   •   Second Unit Director or Assistant Director 
   •   Special Effects by
   •   Visual Effects by
   •   Casting Department
   •   Location Management
   •   Music Department
   •   Thanks

There really isn't that, because there is no code in the script at all. It kind of made sense to me to just add this below. The rest of what is seen in the Cinema1 custom field would put too much strain on the IMDB_ [EN] [HTTPS] _ (Cast & Crew) script when transferring information, as well as the entire PVD database.

Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #284 on: November 01, 2020, 06:51:01 pm »
Thanks for adds up, Ivek! I absolutely understand your reasons, I just needed to clear how things are working.

So, basically, at the moment the largest possible set of IMDb data for movies would be regular IMDb + Cast&Crew + Connection (when fixed) with all custom fields defined in PVD preferences, right?

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #285 on: November 01, 2020, 08:06:49 pm »
So, basically, at the moment the largest possible set of IMDb data for movies would be regular IMDb + Cast&Crew + Connection (when fixed) with all custom fields defined in PVD preferences, right?

Yes, it's right.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #286 on: November 01, 2020, 08:32:18 pm »
Thank you! Now, when "Connection" script is over, a huge update of my movies on the schedule, hahaha!

Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #287 on: November 08, 2020, 09:37:04 am »
SOS. All scripts related to the PVdBDownPage module stopped working for me. You can see that it starts up (! Pic1). And nothing more. After half a minute, a message appears about a large number of invalid Internet connections (! Pic2). I absolutely do not understand what this is connected with. Neither in the Windows settings nor in the modem settings changed anything !!! Guard!!! Note, I have not seen any problems with the Internet connection yet. A week ago, everything was normal. It seems to me that the module is blocked by something, but I have no idea how.  :'( :'( :'(

Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #288 on: November 08, 2020, 01:00:05 pm »
SOS. All scripts related to the PVdBDownPage module stopped working for me. You can see that it starts up (! Pic1). And nothing more. After half a minute, a message appears about a large number of invalid Internet connections (! Pic2). I absolutely do not understand what this is connected with. Neither in the Windows settings nor in the modem settings changed anything !!! Guard!!! Note, I have not seen any problems with the Internet connection yet. A week ago, everything was normal. It seems to me that the module is blocked by something, but I have no idea how.  :'( :'( :'(
P.S. Understood. I don't know why, but I had to change the value "localhost" in the settings of the PVD program to the numbers "127.0.0.1"  ???

Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #289 on: November 08, 2020, 09:23:14 pm »
Good you resolved it, and good tip for others that might have similar issue. Numerous times in numerous apps I have had the same problems: localhost is not recognized, but 127.0.0.1...

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #290 on: November 09, 2020, 08:56:07 am »
IMDB_[EN][HTTPS]_(Connections) V 1.4.1.6 script

Quote
CHANGE LOG :
            V 1.4.1.6 (08/11/2020) Ivek23: Added some new custom fields.

The following custom fields can be added to the IMDB_ [EN] [HTTPS] script.

Origtitle, Title and Localized title custom box.

Quote
Function ParsePage_IMDBMovieBASE(HTML:String):Cardinal; //BlockOpen
.
.
.
    LogMessage('Function ParsePage_IMDBMovieBASE BEGIN======================|');
    Result:=prFinished;  //It will change to prError if any big problem with exit;
    //Because the script don't retreives the data in the page order a token search for the first curPos position or block select is mandatory
    //Get ~title~, ~year~, ~origtitle~, ~poster~
    //Get all "raw" title summary (in raw because we need the hidden links, we avoid "complete" token in strings which opens/closes)
    ItemList:=TextBetWeenFirst(HTML,'<div class="title_block"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
    If (Length(ItemList)>0) Then Begin
        //Get ~title~
        titleValue:=TextBetWeenFirst(ItemList,'<h1 class="">','<');       //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
        AddFieldValueXML('title',titleValue);
      AddCustomFieldValueByName('Title',titleValue);
      AddCustomFieldValueByName('Localized title',titleValue);

        LogMessage('      Get result title:'+titleValue+'||');   
         //First normal kind get of ~year~
        ItemValue:=TextBetWeenFirst(ItemList,'<span id="titleYear">(',')</span>            </h1>');                                 //Strings which opens/closes the data. WEB_SPECIFIC     
        AddFieldValueXML('year',ItemValue);
.
.
.
        //Get ~origtitle~
        ItemValue:=TextBetWeenFirst(ItemList,'<div class="originalTitle">','<');          //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);
        LogMessage('      Get result origtitle:'+ItemValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.');

I updated the IMDB_ [EN] [HTTPS] _ (Connections) script to work again. More information is available at this link.

http://www.videodb.info/forum_en/index.php/topic,4134.msg20857.html#msg20857

IMDB_ [EN] [HTTPS] _ (Connections) script is attached.
« Last Edit: November 09, 2020, 08:57:45 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #291 on: January 27, 2021, 03:33:45 am »
I would like, for example, Title1 to be shown in the left pane/tree view. Is that possible?


« Last Edit: January 27, 2021, 03:35:59 am by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #292 on: January 27, 2021, 08:36:41 am »
As far as I know, unfortunately this option does not exist. But I may be wrong about that.

There is, however, this option and of course, if it is to your liking, then set this option in this menu " View ---> Sort by ---> Original Title "
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #293 on: January 27, 2021, 09:22:15 pm »
Thanks, I was suspected that it is impossible. It is not important for me to sort movies, it's just that I'd like to have in tree view English titles (that is Title1 in my case), when there is one, and in movie pane to have original and localized as surplus.

Except ex-yu movies, all other movies I know mostly by their English title, not their Serbian translation, or by original title. So when listing/scrolling, it's not quite helpful to read Titles, because they are localized, so I have to click every movie whose Title I don't recognize.

That's the reason I was asking the question. Thanks for your response!

Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #294 on: March 27, 2021, 01:20:45 pm »
Is it possible to create an on/off button for the "localhost" function and display it on the PVD panel?

Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #295 on: March 27, 2021, 09:57:07 pm »
I agree it would be extremely helpful, but PVD is abandoned software and no one has access to its code, so it's impossible to add/change options...

Offline jondak

  • User
  • ***
  • Posts: 33
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #296 on: July 20, 2021, 10:19:40 am »
I would like, for example, Title1 to be shown in the left pane/tree view. Is that possible?




I don't know if it what you asking but you can add Orginal title in the left list:



you put something lie this:

%N. %O

This is for 0.9.9.21 but i suspect the 1.0.27 is the same.

Hope this helps.
« Last Edit: August 19, 2021, 09:29:32 am by jondak »

Offline afrocuban

  • Moderator
  • *****
  • Posts: 453
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #297 on: July 30, 2021, 08:23:58 pm »
Thanks jondak. I can confirm it works with 1.0.0.27 mod as well. Only origtitle can be added (http://www.videodb.info/forum_en/index.php/topic,2116.html) and not custom title, but that is better than with title only, in my case and for my needs.
Cheers

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #298 on: August 08, 2021, 11:41:26 am »
IMDB_[EN][HTTPS]V 1.4.2.0 script

Due to the new layout of the Main IMDb websites, it was necessary to fix the entire Function ParsePage_IMDBMovieBASE to now re-download the information from the Main IMDb websites. Certain information is no longer available in the new layout of the Main IMDb websites, such as Bottom 100, or has been modified or hidden, such as IMDB Votes. A hidden mid box and a visible numid box are now added to the script. These are now the custom number fields listed below. 
Quote
    //Get ~MID ID:~ and ~NUM ID::~
   AddCustomFieldValueByName('MID ID:',GetFieldValueXML('mid'));
   LogMessage('  ** Movie MID ID: '+GetFieldValueXML('mid')+' **');
   if GetFieldValueXML('num') <> '0' then AddCustomFieldValueByName('NUM ID:',GetFieldValueXML('num'));
   if GetFieldValueXML('num') <> '0' then LogMessage('   * Movie NUM ID: '+GetFieldValueXML('num')+' ||');

The new origgitle and alternatetitle information have now also been added.
Quote
        //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);
      LogMessage('      Get result origtitle:'+ItemValue+'||');

        //Get ~alternatetitle~
        ItemValue:=TextBetWeenFirst(ItemList,'","alternateName":"','","');          //Strings which opens/closes the data. WEB_SPECIFIC
      AddCustomFieldValueByName('Localized title',ItemValue);
        if ItemValue <> '' then LogMessage('      Get result alternatetitle:'+ItemValue+'||');

A custom Certification field is now added to the ParsePage_IMDBMovieMPAA Function to download the MPAA Certification List by country.
Quote
   //Get "Certification" info
    curPos:=Pos('<td class="ipl-zebra-list__label">Certification</td>',HTML);
    if (curPos=0) then Exit;
    EndPos:=curPos;   
   //Get "Certification" info
   curPos:=Pos('<td class="ipl-zebra-list__label">Certification</td>',HTML);
   If 0<curPos Then Begin      
      EndPos:=curPos;   
        ItemValue1:=HTMLValues2(HTML,'<td class="ipl-zebra-list__label">Certification</td>','</section>','<li class="ipl-inline-list__item">','</li>','<br>   •   ',EndPos);  //WEB_SPECIFIC.
      ItemValue1:=StringReplace(ItemValue1,':',':  ',True,False,True);
      ItemValue1:=StringReplace(ItemValue1,'                                        (','    (',True,False,True);
      AddCustomFieldValueByName('Certification','Certification<br>   •   '+ItemValue1);
      LogMessage('      Certification:<br>'+ItemValue1+'||');

In the Function ParsePage_IMDBMoviePLOTSUMMARY, a custom IMDB Synopsis memo field is added because a function is added that is set to False by default to not transfer full IMDB Synopsis information to the comment field.
Quote
//Script Options-------------------------------------------------------------------------------------------------------
  //Retreive Data Config
.
.
.
//  GET_FULL_PLOT_SUMMARY  = True ;  //Set to False to not wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Comment box. 
  GET_FULL_PLOT_SUMMARY  = False ;  //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Comment box.
//  MAX_IMAGE_HEIGTH  = 1200; //Heigth limit of the stored posters.   
  MAX_IMAGE_HEIGTH  = 500; //Heigth limit of the stored posters.

  //Process Data Config
Quote
   // ~Plot Summary~
   If (Pos('It looks like we don'+Chr(39)+'t have any Summaries for this title yet.',HTML)>0) then Exit;   
   //Get "Summaries" info (~Comment~)
   If Pos('<h1 class="header">Plot</h1>',HTML)>0 Then Begin
      curPos:=Pos('<h1 class="header">Plot</h1>',HTML);
      EndPos:=curPos;   
      ItemValue:=HTMLValues2(HTML,'Plot','See also','<li class="ipl-zebra-list__item" id="summary','</p>','<br><br>-------<br><br>',EndPos);   
      ItemValue:=StringReplace(ItemValue,'<a href='+Chr(39),'<link url="'+GetFieldValueXML('url'),True,False,True);
      ItemValue:=StringReplace(ItemValue,'?ref_='+Chr(39)+'>',+'">',True,False,True);
      ItemValue:=StringReplace(ItemValue,'</a>','</link>',True,False,True);
      LogMessage('      Get result ItemValue (~Comment~):'+ItemValue+'||');   
   End;

I also fixed the maximum poster size to 500 due to the smaller size that the database stores. because this also reduces the size of the database size itself. PVD therefore also works better.

Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2690
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #299 on: August 08, 2021, 11:45:39 am »
Here is the new final IMDB_ [EN] [HTTPS] V 1.4.2.0 script version.

In the IMDbMoviesUrl custom box you now also have a link to the OMDb API website

Quote
//OBLIGATORY CALLBACK PRINCIPAL FUNCTION=========================================================================BlockOpen
Function ParsePage(HTML:String;URL:AnsiString):Cardinal; //BlockOpen
  Var
    MovieID,titleValue,yearValue:String;
    ResultTmp:Cardinal;
    Date:String;
    Fullinfo,Movie_URL,IMDB_URL: String;
    DateParts: TWideArray;
  Begin
    LogMessage('Function ParsePage BEGIN======================|');
    LogMessage('Global Var-Mode|'+IntToStr(Mode)+'|');
    LogMessage('Global Var-DownloadURL|'+DownloadURL+'|');
    LogMessage('      Local Var-URL|'+URL+'|');
//Parse return in mode 'Search Movie URL'--------------------------------------------------------------------------------
    If (Mode=smSearch) Then Begin
        titleValue:=GetFieldValueXML('origtitle');
        If (Length(titleValue)=0) Then titleValue:=GetFieldValueXML('title');
        yearValue:=GetFieldValueXML('year');       
        If yearValue='0' Then yearValue:=''; // Better no Year (blank) for the searches.
        LogMessage('  ParsePage smSearch|'+IntToStr(Mode)+'|. Searching DownloadURL for MovieTitle |'+ titleValue+'|'+' MovieYear |'+ yearValue+'|');
        //Download Provider search page.
        DownloadURL:=StringReplace(BASE_URL_SEARCH_PROV,'%s',titleValue,True,True,False);
        DownloadURL:=StringReplace(DownloadURL,' ','+',True,True,False);            //Better list of results without spaces.
        DownloadURL:=StringReplace(DownloadURL,'%y',yearValue,True,True,False);
        LogMessage('      Searching in Provider:|' + DownloadURL + '||');
        HTML:=DownloadPage(DownloadURL);  //True page for parsing the search
        //HTML:=FileToString( GetAppPath + '\Scripts\IMDB_[EN][HTTPS].v.1.0.0.0\' + 'V.1.0.0.0-IMDb-[Advanced.Search]-Padrino.htm'); //Debug
        HTML:=HTMLToText(HTML);
        Result:=ParsePage_IMDBSearchTitle(HTML);
        If ((Result=prError) and SEARCH_ENGINE) Then Begin  //No results or Redirection -> Search Engine needed
            LogMessage('        Not results or Redirection in Provider search, try with Bing');
            //Download Bing search page.
            DownloadURL:=StringReplace(BASE_URL_SEARCH_ENGI,'%p',BASE_URL_PRE_TRUE,True,True,False);   //WEB_SPECIFIC
            DownloadURL:=StringReplace(DownloadURL,'%s',titleValue,True,True,False);                 //WEB_SPECIFIC
            DownloadURL:=StringReplace(DownloadURL,' ','+',True,True,False);                         //Better list of results without spaces. WEB_SPECIFIC
            DownloadURL:=StringReplace(DownloadURL,'%y',yearValue,True,True,False);                  //WEB_SPECIFIC
            LogMessage('      Searching in Bing:|' + DownloadURL + '||');
            HTML:=DownloadPage(DownloadURL);  //True page for parsing the search
            HTML:=HTMLToText(HTML);
            Result:=ParsePage_BingSearch(HTML);
        End;
        //Parse the returned result of the search list.
        If Result=prError Then Begin //Not movie found, script finish in error.
            Mode:=smFinished;
            LogMessage('Function ParsePage smSearch-prError END======================|');
        End;
        If Result=prList Then Begin //One list of results loaded, needed user choice exit in the script mode (because HTTPS PVD NOT directly will download the user choice).
            Mode:=smSearchList;
            LogMessage('Function ParsePage smSearch-prList END======================|');
        End;
        If Result=prDownload Then Begin   //One results, exit needed only continue the script.
            Mode:=smNormal;
            LogMessage('Function ParsePage smSearch-prDownload END======================|');
        End;
        Exit;       
    End;     
//Parse return of 'SearchList Movie URL'-----------------------------------------------------------------------
    If (Mode=smSearchList) Then Begin       //The user have choose the link.
        LogMessage('  ParsePage mode smSearchList. Getting DownloadURL from the return of smSearchList');
      DownloadURL:=StringReplace(URL,CHEAT_PREFIX_URL,'',True,False,False);   //Eliminate the CHEAT_PREFIX_URL for get the true movie link
        DownloadURL:=StringReplace(DownloadURL,'http:','https:',True,True,False); //The direct url needed (no https redirection)
        LogMessage('     Global Var-DownloadURL|'+DownloadURL+'|');
        Mode:=smNormal;
        Result:=prDownload;  //But not exit needed for download the page because is HTTPS
        LogMessage('     With the good movie URL it demand download the movie page');
    End;
//Parse with the Movie URL 'smNormal'------------------------------------------------------------------------------------
    If (Mode=smNormal) Then Begin
        //Get the script Overwrite Options saved in pvdconf.ini (Remember that PVD only save the options on exit)
        //0=Do nothing,1=Set if Empty,2=Overwrite
        PVDConfigOptions:=TextBetWeenFirst(FileToString(GetAppPath+'pvdconf.ini'),'IMDB_[EN][HTTPS].psf=',Chr(13));
            //LogMessage('Stored Script PVDConfigOptions is:'+PVDConfigOptions+'||');
            //LogMessage('The Script option of position '+ IntToStr(opPoster) +' is:'+Copy(PVDConfigOptions,opPoster,1)+'||');
        Result:=prFinished;  //It will change to prError if any big problem with exit; 
        //Information in several page. Needs Provider MovieID
        MovieID:=TextBetWeenFirst(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_SUF);
        LogMessage('  ParsePage mode smNormal|'+IntToStr(Mode)+'|. Getting provider data for MovieID|'+ MovieID +'|');
        AddCustomFieldValueByName('IMDbID',MovieID);
      AddCustomFieldValueByName('IMDbID:',MovieID);
        LogMessage('      Get result IMDbID (CF~IMDbID~):'+MovieID+'||');
        //Get ~url~
        if (0=Pos(BASE_URL_PRE,StoredURL)) then begin   //Write the url if not exists
            AddFieldValueXML('url',StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False));
            LogMessage('      Get result url:'+StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False)+'||');
        end;
        //Get ~IMDb Movie Url~       
        Movie_URL:=StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False);
      AddCustomFieldValueByName('IMDb.com','<link url="'+Movie_URL+'">IMDb.com</link>');
      AddCustomFieldValueByName('IMDbMoviesUrl','<link url="'+Movie_URL+'">IMDb MovieUrl</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('      Get result Movie_url: '+Movie_URL+' ||');
      LogMessage('      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_UR+'">Maindetails</link>  ';
        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">TechnicalSpecs</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">Miscellaneous</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="'+Movie_URLL+'externalsites#misc">MiscSites</link>  ';
        //Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites#photos">MiscPhoto</link>  ';
        If Fullinfo <> '' then IMDB_URL:=Fullinfo;
        If IMDB_URL <> '' then AddCustomFieldValueByName('IMDb Movie Url',IMDB_URL);
        LogMessage('      Get result Fullinfo-IMDB_URL (CF~IMDb Movie Url~ ):'+#13+IMDB_URL+'||')
    //Parse principal provider page = BASE_URL_PRE_TRUE------------------------------------------------------------------

IMDB_[EN][HTTPS] script is attached.
« Last Edit: September 19, 2021, 07:43:04 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything