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

0 Members and 7 Guests are viewing this topic.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #140 on: November 28, 2018, 09:02:33 am »
IMDB_ [EN] [HTTPS] (Plot Keywords) script

IMDB_ [EN] [HTTPS] (Plot Keywords) script now has the option to download the full number of Plot Keywords records. Also, the possibility of a limited number of Plot Keywords records is added, because in some cases a very large number of records is also available for a specific movie (the numbers also range over 400 or even 500 or more records). The limit is set to the number of 100 records in the PVD Tags field. IMDB_ [EN] [HTTPS] (Plot Keywords) script still transmits the full number of records, after which the filter allows 100 records in the PVD Tags field. Thus, IMDB_ [EN] [HTTPS] (Plot Keywords) script in some cases requires a lot of time to add records to the PVD database. I am still looking for a way or solution so that only a limited number of records (100) can be transmitted by IMDB_ [EN] [HTTPS] (Plot Keywords) script and written in the PVD Tags field and therefore it would take less time to add records to the PVD database .

Quote
  GET_FULL_PLOTKEYWORDS  = True ;  //Download Plot Keywords provider page for retreive the Plot Keywords info. Otherwise only the info of the principal movie page
  GET_PLOTKEYWORDS_LIMIT  = True ;  //Download Full of number of tags retrieved. Otherwise True for the only the Limit of number of tags retrieved.      * Get Limit of number of tags retrieved.
//  GET_PLOTKEYWORDS_LIMIT  = False ;  //Download Full of number of tags retrieved. Otherwise True for the only the Limit of number of tags retrieved.   ** Get Full of number of tags retrieved.
  PLOTKEYWORDS_LIMIT  = 100;    //Limit of number of tags retrieved.

In IMDB_ [EN] [HTTPS] (Plot Keywords) script, you can manually modify the way you transfer your records by blocking the current open setting and unblocking the currently blocked setting. With this change, the script will download the full number of records.

The new version of IMDB_ [EN] [HTTPS] (Plot Keywords) script is attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #141 on: December 01, 2018, 03:34:45 pm »
IMDB_ [EN] [HTTPS] (Plot Keywords) script

Now there is the final version of IMDB [EN] [HTTPS] (Plot Keywords) script for use.

Changes to the final version of IMDB [EN] [HTTPS] (Plot Keywords) script:

Quote
  GET_FULL_PLOTKEYWORDS  = True ;  //Download Plot Keywords provider page for retreive the Plot Keywords info. Otherwise only the info of the principal movie page
  GET_PLOTKEYWORDS_LIMIT  = True ;  //Download Full of number of tags retrieved. Otherwise True for the only the Limit of number of tags retrieved.      * Get Limit of number of tags retrieved.
//  GET_PLOTKEYWORDS_LIMIT  = False ;  //Download Full of number of tags retrieved. Otherwise True for the only the Limit of number of tags retrieved.   ** Get Full of number of tags retrieved.
  PLOTKEYWORDS_LIMIT  = 100;    //Limit of number of tags retrieved.

The change is now described correctly and now looks like this:
Quote
  GET_FULL_PLOTKEYWORDS  = True ;  //Download Plot Keywords provider page for retreive the Plot Keywords info. Otherwise only the info of the principal movie page
  GET_PLOTKEYWORDS_LIMIT  = True ;    //Download Limit of number of tags retrieved.   * Get True for Limit of number of tags retrieved.
//  GET_PLOTKEYWORDS_LIMIT  = False ;    //Download Full of number of tags retrieved.  ** Get False for Full of number of tags retrieved.
  PLOTKEYWORDS_LIMIT  = 100;    //Limit of number of tags retrieved.
The download limit is set to 100 tags, but the script transfers 101 tags because the index starts to count at 0 digits.
In IMDB_ [EN] [HTTPS] (Plot Keywords) script, you can manually modify the way you transfer your records by blocking the current open setting and unblocking the currently blocked setting. With this change, the script will download the full number of records.

Added Plot Keywords to download info on the main movie page.

Now, the script works to limit the number of records faster, because I found a way that is faster than the previous one and only transfers as many records as the actual number is written in PLOTKEYWORDS_LIMIT options.

Quote
Function TextBetWeenFirst(_HTML:string;_ABegin,_AEnd:String):String; //BlockOpen
    //Returns the first extract part of a given _HTML between _Abegin and _AEnd and removes all tags from the result substring.
    //In order to avoid set the Pos variable in TextBetween
  Var
    _Pos:Integer;
  Begin
    _Pos:=0;
    Result:=TextBetWeen(_HTML,_ABegin,_AEnd,false,_Pos);
    Exit;   
End; //BlockClose 
function RemoveTagsEx(AText:String):String; //BlockOpen
Var
   B,E:Integer;
Begin
   Result:=AText;
   B:=PosFrom('    <div class="did-',Result,18);
   E:=PosFrom('      </span>',Result,B);
   While (B>0) AND (B<E) Do Begin
      Delete(Result,B,E-B+18);
      B:=Pos('    <div class="did-',Result);
      E:=Pos('      </span>',Result);
   End;
End; //BlockClose

Function ParsePage_BingSearch(HTML:String):Cardinal; //BlockOpen

This part of the code is also needed, otherwise the script does not work.

Also added is the Plot Keywords custom field in which the URL is transferred to the website and how much is the full number of Plot Keywords records for a specific movie title on the Plot Keywords web page. You can Plot Keywords custom field settings found in Possibles improving Custom Fields working in MOD version topic.

The final version of IMDB [EN] [HTTPS] (Plot Keywords) script is attached.
« Last Edit: December 02, 2018, 04:04:07 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #142 on: December 02, 2018, 10:41:08 am »
Well done, Ivek32.
You really master the script working flow of the PVD MOD.
I'm going to integrate the retreive of Plotkeywords in the base script of IMDB (although 100 seem to me many) and Connections when you tell me it is ready.
Now I do not have much time, but it is first in my ToDo list.

Note: If Nostra wakes up and simply compiles the actual PVD with the libraries for HTTPS, we would have powerful scripts that could be quickly adapted to the oficial version.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #143 on: December 02, 2018, 04:08:43 pm »
Well done, Ivek32.
You really master the script working flow of the PVD MOD.
I'm going to integrate the retreive of Plotkeywords in the base script of IMDB (although 100 seem to me many) ...

Thank you.
 
I agree that there are 100 records too, so my suggestion is up to 50 records. I tend to be more inclined to a more appropriate number, that is, only 25 records in the database, what is the best variant that occupies a bit of space, especially when it is important in the record, which has a larger number of words in one record.

Note:
Quote
Function TextBetWeenFirst(_HTML:string;_ABegin,_AEnd:String):String; //BlockOpen
    //Returns the first extract part of a given _HTML between _Abegin and _AEnd and removes all tags from the result substring.
    //In order to avoid set the Pos variable in TextBetween
  Var
    _Pos:Integer;
  Begin
    _Pos:=0;
    Result:=TextBetWeen(_HTML,_ABegin,_AEnd,false,_Pos);
    Exit;   
End; //BlockClose 
function RemoveTagsEx(AText:String):String; //BlockOpen
Var
   B,E:Integer;
Begin
   Result:=AText;
   B:=PosFrom('    <div class="did-',Result,18);
   E:=PosFrom('      </span>',Result,B);
   While (B>0) AND (B<E) Do Begin
      Delete(Result,B,E-B+18);
      B:=Pos('    <div class="did-',Result);
      E:=Pos('      </span>',Result);
   End;
End; //BlockClose

Function ParsePage_BingSearch(HTML:String):Cardinal; //BlockOpen

This part of the code is also needed, otherwise the script does not work.

I'm going to integrate the retreive of Plotkeywords in the base script of IMDB (although 100 seem to me many) and Connections when you tell me it is ready.
Now I do not have much time, but it is first in my ToDo list.

Recommendation:
Yes, Plotkeywords in the base script of IMDB and Connections as a secondary script.


As soon as the final version of the Connections script is finished. There are still a few tests to work properly for the final version.

Note: If Nostra wakes up and simply compiles the actual PVD with the libraries for HTTPS, we would have powerful scripts that could be quickly adapted to the oficial version.

It would be great if your wish in the future will also come true, let's wait and we'll see ...
« Last Edit: December 02, 2018, 04:15:29 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #144 on: December 15, 2018, 07:54:42 am »
IMDB_ [EN] [HTTPS] script

Minor changes to the Title / OrigTitle code because there were minor changes in the source code of the page. The correction will be added to the next version of the IMDB_ [EN] [HTTPS] script.


Quote
Function ParsePage_IMDBMovieBASE(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If żany big problem? with exit;
    //Retrieve: ~title~, ~year~, ~origtitle~, ~poster~ / ~imdbrating~, ~IMDB_Votes~ (Custom Field) / ~TOP_250~(Custom Field) /
    //          If Not(GET_FULL_CREDIT): ~crew~ctDirectors,ctWriters,ctComposers,ctProducers(Not in base page), ctActors
    //         ~description~ / ~category~ "keywords" / ~tagline~ / ~genre~
    //         If Not(GET_FULL_MPAA) ~mpaa~
    //         ~country~ / ~rdate~ in contry provider local IP geolocation
    //         If Not(GET_FULL_AKA) ~aka~.
    //         ~budget~ / ~money~ / ~studio~ "Production Co"
    //         If Not(GET_FULL_FEATURES) ~features~
  Var
      curPos,endPos,index:Integer;
      ItemValue,ItemList,ImageFile:String;
      titleValue:String;
      Name,Role,PersonURL:String;
      ItemArray:TWideArray;
  Begin
    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    
      //titleValue:=TextBetWeenFirst(ItemList,'<div class="title_wrapper"><h1 class="">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
      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);
      LogMessage('      Get result title:'+titleValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,'<span id="titleYear">(',')</span>            </h1>');                                 //Strings which opens/closes the data. WEB_SPECIFIC      
        AddFieldValueXML('year',ItemValue);
        LogMessage('      Get result year:'+ItemValue+'||');
        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);
        LogMessage('      Get result origtitle:'+ItemValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.');                 //Get poster code. Strings which opens/closes the data. WEB_SPECIFIC
        If (Length(ItemValue)>0) then begin
            ItemValue:=BASE_URL_IMAGE_PRE_TRUE + ItemValue;                             //Base poster URL without '.jpg'. WEB_SPECIFIC
            ImageFile:=GetAppPath+'Scripts\'+BASE_DOWNLOAD_FILE_IMAGE_NAME+'-Poster.jpg'
            // Avoid HTTPS redirection: Download https image to file  OutPutFile=
            If (1=DownloadImage(ItemValue + '._V1_UY' + IntToStr(MAX_IMAGE_HEIGTH) + '_.jpg',ImageFile)) then begin  //Dowload in the selected user max size. WEB_SPECIFIC
                //AddImageURL(itPoster,ImageFile);    //Get the photo from a file even if the next line we log the true URL.
                LogMessage('      Get result poster:'+ItemValue + '._V1_UY' + IntToStr(MAX_IMAGE_HEIGTH) + '_.jpg'+'||');
            end else if (1=DownloadImage(ItemValue +'.jpg',ImageFile)) then begin  //Dowload in the web base size. WEB_SPECIFIC
                //AddImageURL(itPoster,ImageFile);    //Get the photo from a file even if the next line we log the true URL.
                LogMessage('      Get result poster:' + ItemValue + '.jpg'+'||');
            end;       
        end;
    End;
« Last Edit: December 15, 2018, 09:15:44 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #145 on: December 22, 2018, 02:33:03 pm »
IMDB_[EN][HTTPS]_(Connections) script

IMDB_[EN][HTTPS] (Connections) script is now renamed to IMDB_[EN][HTTPS]_(Connections) script and now this is the final version of the script.


IMDB_[EN][HTTPS] (Connections) script

I've edited the MOD version of IMDB_ [EN] [HTTPS] script, which is now called IMDB_ [EN] [HTTPS] (Connections) script to transfer the Movie Connections information to the Normal Connections PVD field.

An additional code has also been added to transfer the category, which is allowed to record
url titles in the Connections custom box for links to the Connections website. In the Connections custom field, your data record will look like this,
Quote
Followed by (2)   Version of (58)   Spin-off (1)   References (6)   Referenced in (27)   Features (1)   Featured in (1)   Spoofs (1)   Spoofed in (2)
it will also have a visible option in the record, clicking on it, in order to open the Internet window of this record in the web browser.

In case of only such a record,
Quote
Spin-off (1)
there will be no url link to the Connections website.

I've done this by fixing a link to a specific IMDb Movie Connections website in the Custom Connections field. Custom Connections field still has links to individual categories and how many records are in each category. Where there is only one category where no link has been made so far, it is now a direct link to a particular IMDb Movie Connections website.

New is now the Connect Custom Box, where you can now set the PVD view so that you can now see the categories and the number of movie titles and which movie addresses are in a particular category [for example, the following number of movie titles are followed: Follows (10) ].

Quote
  5. Connections field info names:   
     • Follows
     • Followed_by
     • Version_of
     • Remake_of
     • Remade_as
     • Edited_from
     • Edited_into
     • Spin_off_from (Spun_off_from)
     • Spin_off
     • References
     • Referenced_in
     • Features
     • Featured_in
     • Spoofs
     • Spoofed_in
These are all categories whose information can be transferred to the PVD database. Missing category " Alternate-language version of ", because I have noticed this category so far or found it with only one movie title.

Quote
  GET_FULL_CONNECTIONS  = True ;  //Download Connections provider page for retreive the MovieConnections info. Otherwise no info of the Connections provider page.
If you change this function, there is no transfer of any information.

Quote
  GET_FULL_CONNECT  = False ;  //Download Connections provider page for retreive the Follows, Followed_by, Version_of, Remake_of, Remade_as, Edited_from, Edited_into, Spin_off_from(Spun_off_from) and Spin_off info. Otherwise set to True to only the Follows and Followed by info of the Connections provider page.
If you change this function, the transfer of information will only be for the Follows and Followed by the info of the Connections provider page. You must also use the lower function you can not change, otherwise some other categories will be downloaded.

Quote
  GET_FULL_CONNECTION  = True ;  //Download Connections provider page for retreive the Follows, Followed_by, Version_of, Remake_of, Remade_as, Edited_from, Edited_into, Spin_off_from(Spun_off_from) and Spin_off info of the Connections provider page. Otherwise set to False to the full MovieConnections info.
If you change this feature, you will be transferring all the information on the Connections provider page.
Quote
Notice:
This function is basic set flagged-blocked with a " True " word.

Quote
Footnote:
You can change the functions according to your preferences, of course.

Quote
  CONNECT_LIMIT  = 100;    //Limit of number of connections retrieved.
The limit is basic set to the 100 records, because there may be several records in the same category as the limit is set. This number allows the script to run faster, although records may also be several times higher.

Also, filtering records with this part of the code is added, which allows the database to be visible only for movies and movies with the TV Movie tag in the normal OrigTitle PVD field.
Quote
If Pos('(Empty)',Title) OR Pos('(TV Episode)',OrigTitle) OR Pos('(TV Series)',OrigTitle) OR Pos('(TV Mini-Series)',OrigTitle) OR Pos('(Short)',OrigTitle) OR Pos('(TV Short)',OrigTitle) OR Pos('(TV Special)',OrigTitle) OR Pos('(Video Game)',OrigTitle) OR Pos('(Video)',OrigTitle) < 1 then
The following categories have such a filter:
Quote
     • Remake_of
     • Remade_as
     • Edited_into
     • Spin_off_from (Spun_off_from)
     • References
     • Referenced_in
     • Features
     • Featured_in
     • Spoofs
     • Spoofed_in

The following categories have in the database in addition to already visible records for movies and movies with the TV Movie tag as well as the TV Series tag in the normal OrigTitle PVD field.
Quote
     • Version_of
     • Edited_from

The following categories have in the database in addition to already visible records for movies and movies with the TV Movie tag as well as the TV Series and Video tag in the normal OrigTitle PVD field.
Quote
     • Follows
     • Followed_by
     • Spin_off

IMDB_ [EN] [HTTPS]_(Connections) script is attached.
« Last Edit: December 22, 2018, 04:26:45 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #146 on: December 22, 2018, 03:30:39 pm »
IMDB_ [EN] [HTTPS]_(Connections) script

Notice:


I added the OrigTitle code, which is essential for filtering records at all and does not change. In the Connection field, the notes will also have a year (for example, For Your Eyes Only (1981)), which is written only in the Original Title field, but not in the Titile field in the PVD database. This option is added so that you often see multiple identical titles of the title of a movie, but the years of the movie outcome are different. This is removed at that time (movie year) when you update the movie record and the Original Title checkbox is confirmed.

The complete code in IMDB_ [EN] [HTTPS] _ (Connections) script for downloading Connections information should not be added to the original IMDB_ [EN] [HTTPS] script, because it will greatly slow down the performance of the script. IMDB_ [EN] [HTTPS] _ (Connections) script should remain as user only an additional script that will be used only by those users who will, at their option, want to download Connections information in their PVD Movies database.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #147 on: January 03, 2019, 09:07:56 am »
IMDB_[EN][HTTPS] (Connections) script

I'm going to integrate the retreive of Plotkeywords in the base script of IMDB (although 100 seem to me many) and Connections when you tell me it is ready.
Now I do not have much time, but it is first in my ToDo list.

Recommendation:
Yes, Plotkeywords in the base script of IMDB and Connections as a secondary script.

I mentioned this because, for example, The Spy Who Loved Me movie title had a problem and IMDB_ [EN] [HTTPS] (Connections) script did not find a Connections website, but it always reported that the page or url of the address could not be found.  The Connections web page url, however, was passed through a specific part of the code to the custom field, which proved that the page actually exists. Then I found a part of the code
Quote
Function DownloadPage(URL:AnsiString):String; //BlockOpen
//Returns the URL page text. If error returns empty string
  Var
    i:Integer;
    ScriptPath,WebText:String;
    Begin
.
.
.
    if (Pos('404 Error - IMDb',Result)>0) then begin  //Banned IP. WEB_SPECIFIC.
        If BYPASS_SILENT Then ShowMessage('The URL is not in use (404 Error - IMDb).'+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)+'      404 Error - IMDb|');
        Result:=''; //Fatal error
    End;
    //if (Pos('Page not found',Result)>0) then begin  //Banned IP. WEB_SPECIFIC.
    //    If BYPASS_SILENT Then ShowMessage('The URL is not in use (Page not found).'+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)+'      Page not found|');
    //    Result:=''; //Fatal error
    //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;
.
.
.
    LogMessage(Chr(9)+Chr(9)+'Function DownloadPage END======================|');
    exit;
  End; //BlockClose
that prevented the detection of the website and I blocked it. The result of blocking this part of the code was that the IMDB_ [EN] [HTTPS] (Connections) script worked properly and correctly downloaded the data for this movie from the Connections website.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #148 on: January 03, 2019, 09:26:27 am »
IMDB_ [EN] [HTTPS] script

Minor changes to the code.


Quote
Function ParsePage_IMDBMovieBASE(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If żany big problem? with exit;
    //Retrieve: ~title~, ~year~, ~origtitle~, ~poster~ / ~imdbrating~, ~IMDB_Votes~ (Custom Field) / ~TOP_250~(Custom Field) /
    //          If Not(GET_FULL_CREDIT): ~crew~ctDirectors,ctWriters,ctComposers,ctProducers(Not in base page), ctActors
    //         ~description~ / ~category~ "keywords" / ~tagline~ / ~genre~
    //         If Not(GET_FULL_MPAA) ~mpaa~
    //         ~country~ / ~rdate~ in contry provider local IP geolocation
    //         If Not(GET_FULL_AKA) ~aka~.
    //         ~budget~ / ~money~ / ~studio~ "Production Co"
    //         If Not(GET_FULL_FEATURES) ~features~
  Var
      curPos,endPos,index:Integer;
      ItemValue1,ItemValue,ItemList,ImageFile:String;
      titleValue:String;
      Name,Role,PersonURL:String;
      ItemArray:TWideArray;
  Begin
    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    
   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);
      LogMessage('      Get result title:'+titleValue+'||'); 

        ItemValue:=TextBetWeenFirst(ItemList,'<span id="titleYear">(',')</span>            </h1>');                                 //Strings which opens/closes the data. WEB_SPECIFIC      
        AddFieldValueXML('year',ItemValue);
        LogMessage('      Get result year:'+ItemValue+'||');
        endPos:=PosFrom('title="See more release dates" >',ItemList,curPos);
      curPos:=PosFrom('title="See more release dates" >',ItemList,endPos);   
      endPos:=PosFrom('</a>            </div>',ItemList,curPos);   
      curPos:=curPos+43;
      ItemValue1:=Copy(ItemList,curPos,4);
      LogMessage('      Get result year00:'+ItemValue1+'||');
      ItemValue1:=StringReplace(ItemValue1,'/a> ','',True,False,True);
        if ItemValue1 <> '' then AddFieldValueXML('year',ItemValue1);
        if ItemValue1 <> '' then LogMessage('      Get result year0:'+ItemValue1+'||');   

        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);
        LogMessage('      Get result origtitle:'+ItemValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.');                 //Get poster code. Strings which opens/closes the data. WEB_SPECIFIC
        If (Length(ItemValue)>0) then begin
            ItemValue:=BASE_URL_IMAGE_PRE_TRUE + ItemValue;                             //Base poster URL without '.jpg'. WEB_SPECIFIC
            ImageFile:=GetAppPath+'Scripts\'+BASE_DOWNLOAD_FILE_IMAGE_NAME+'-Poster.jpg'
            // Avoid HTTPS redirection: Download https image to file  OutPutFile=
            If (1=DownloadImage(ItemValue + '._V1_UY' + IntToStr(MAX_IMAGE_HEIGTH) + '_.jpg',ImageFile)) then begin  //Dowload in the selected user max size. WEB_SPECIFIC
                //AddImageURL(itPoster,ImageFile);    //Get the photo from a file even if the next line we log the true URL.
                LogMessage('      Get result poster:'+ItemValue + '._V1_UY' + IntToStr(MAX_IMAGE_HEIGTH) + '_.jpg'+'||');
            end else if (1=DownloadImage(ItemValue +'.jpg',ImageFile)) then begin  //Dowload in the web base size. WEB_SPECIFIC
                //AddImageURL(itPoster,ImageFile);    //Get the photo from a file even if the next line we log the true URL.
                LogMessage('      Get result poster:' + ItemValue + '.jpg'+'||');
            end;       
        end;
    End;

Quote
    //Get ~script info~
    //Get ~rdate~ in contry provider local IP geolocation. See: http://sobizarre-en.blogspot.fr/2014/12/how-to-easily-defeat-imdb-geolocation.html
    //Get ~imdbrating~, ~IMDB_Votes~ (Two tries)
    ItemList:=TextBetWeenFirst(HTML,'<script type="application/ld+json"','}</script>'); //WEB_SPECIFIC.
    If (Length(ItemList)>0) Then Begin
      ItemValue:=TextBetWeenFirst(ItemList,'"@type": "','",');   //Strings which opens/closes the data. WEB_SPECIFIC      
      ItemValue:=StringReplace(ItemValue,'TVSeries','TV Series',True,False,True);
      ItemValue:=StringReplace(ItemValue,'TVEpisode','TV Episode',True,False,True);      
      //AddCustomFieldValueByName('IMDBMovietype',ItemValue);
      //LogMessage('      Get result MediaType (CF~IMDBMovietype~):'+ItemValue+'||');
      MediaType:=StringReplace(ItemValue,'TVSeries','TV Series',True,False,True);
      MediaType:=StringReplace(ItemValue,'TVEpisode','TV Episode',True,False,True);               
      AddCustomFieldValueByName('IMDB_Movietype',MediaType);
      LogMessage('      Get result MediaType (CF~IMDB_Movietype~):'+MediaType+'||');
      ItemValue:=TextBetWeenFirst(ItemList,'"contentRating": "','",');   //Strings which opens/closes the data. WEB_SPECIFIC
      AddCustomFieldValueByName('IMDB_MPAA',ItemValue);                                 
      if ItemValue <> '' then LogMessage('      Get result ContentRating (CF~IMDB_MPAA~):'+ItemValue+'||');
   ImageFile:=TextBetWeenFirst(ItemList,'"image": "','._V1_.jpg",')+'._V1_UY'+IntToStr(MAX_IMAGE_HEIGTH)+'_.jpg';
   AddImageURL(itPoster,ImageFile);
   LogMessage('      Get result poster:' + ImageFile +'||');
   ItemValue1:=TextBetWeenFirst(ItemList,'"datePublished": "','-');
   //AddFieldValueXML('year',ItemValue1);
    LogMessage('      Get result year01:'+ItemValue1+'||');

      ItemValue:=TextBetWeenFirst(ItemList,'"datePublished": "','",');   //Strings which opens/closes the data. WEB_SPECIFIC
        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('      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('      Get result DatePublished ~rdate~ (CF~IMDB Release Date~):'+ItemValue+'||');      
      End;
      ItemValue:=TextBetWeenFirst(ItemList,'"ratingCount": ',',');   //Strings which opens/closes the data. WEB_SPECIFIC
      AddCustomFieldValueByName('IMDB_Votes',ItemValue);      
      if ItemValue <> '' then LogMessage('      Get result ratingCount (~IMDB_Votes~): '+ItemValue+' ||');   
      ItemValue:=TextBetWeenFirst(ItemList,'"ratingValue": "','"');   //Strings which opens/closes the data. WEB_SPECIFIC
      AddFieldValueXML('imdbrating',ItemValue);
      AddCustomFieldValueByName('IMDB Rating',ItemValue);
      AddCustomFieldValueByName('IMDBRating',ItemValue);
      if ItemValue <> '' then LogMessage('      Get result ratingValue ~imdbrating~ (CF~IMDB Rating~~IMDBRating~): '+ItemValue+' ||');         
    End;
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #149 on: January 03, 2019, 09:39:59 am »
IMDB_ [EN] [HTTPS] script

Minor changes to the code.


Quote
    //Get "plot_summary" as ~comment~ (In the PVD check fields table selection only ~description~ can be checked for overwrite but the user can change the config and
    // write ~description~ in ~comment~ so with the script parameter we Avoid double use of ~description~ and ~comment~.
    If Not(PRESERVE_PVD_DESCRIPTION_SETTING) Then Begin
        curPos:=Pos('<div class="plot_summary',HTML);                                 //WEB_SPECIFIC.   
        If 0<curPos then begin
            curPos:=Pos('<div class="summary_text">',HTML);                                 //WEB_SPECIFIC.
            If 0<curPos Then Begin
                //ItemValue:=TextBetWeen(HTML,'<div class="summary_text">','</div>',false,curPos);   //Strings which opens/closes the data. WEB_SPECIFIC
                ItemValue:=TextBetWeen(HTML,'<div class="summary_text','</div>',false,curPos);   //Strings which opens/closes the data. WEB_SPECIFIC
      curPos:=Pos('  <a href="',ItemValue);
               If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);

                ItemValue:=StringReplace(ItemValue,',            ',', ',True,False,True);
                ItemValue:=StringReplace(ItemValue,'            ',' ',True,False,True);
                ItemValue:=StringReplace(ItemValue,'        ',' ',True,False,True);
                ItemValue:=StringReplace(ItemValue,'Add a Plot »','',True,False,True);
                ItemValue:=StringReplace(ItemValue,'See full summary »','',True,False,True);
                ItemValue:=StringReplace(ItemValue,'">','',True,False,True);
                curPos:=Pos('var ue_t0=ue_t0||+new Date();var ',ItemValue);
                If 0<curPos then ItemValue:=Copy(ItemValue,0,curPos-1);
                AddFieldValueXML('comment',ItemValue);
                LogMessage('      Get result "Plot_summary" as ~comment~:'+ItemValue+'||');
            End;
        End;   
    End;


New part of the added code.
Quote
//USER FUNCTIONS AND PROCEDURES==================================================================================BlockClose
//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
.
.
.
//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);
        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);
        LogMessage('      Get result Movie_url: '+Movie_URL+' ||');
   Fullinfo:='';
      Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'">Maindetails</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+'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+'mediaindex">PhotoGallery</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------------------------------------------------------------------
« Last Edit: January 03, 2019, 09:43:46 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 VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #150 on: January 05, 2019, 03:10:50 pm »
Attached temporal Acumulative Scripts Patch date: 2019.01.05 (to copy in PVD folder for overwriting the existing files).

Changelog:
        IMDB_[EN][HTTPS]
                  V 1.4.0.0 (05/01/2019) Ivek23: Added ParsePage_PLOTKEYWORDS. Ivek23 corrections since last version (see forum).


Notes for Ivek23:
  • Not included the parameter GET_PLOTKEYWORDS_LIMIT=False because is redundant with PLOTKEYWORDS_LIMIT set in a big number
  • Not included the script part "Connections" as suggested (but we can include it with parameter GET_CONNECTIONS=False)
  • Corrected: "curPos:=curPos+43;" by "curPos:=curPos+45;" in order to get the good year (at least in Amadeus movie)
  • Not included the code part of Post:

       ImageFile:=TextBetWeenFirst(ItemList,'"image": "','._V1_.jpg",')+'._V1_UY'+IntToStr(MAX_IMAGE_HEIGTH)+'_.jpg';
       AddImageURL(itPoster,ImageFile);
       LogMessage('      Get result poster:' + ImageFile +'||');
       ItemValue1:=TextBetWeenFirst(ItemList,'"datePublished": "','-');
       //AddFieldValueXML('year',ItemValue1);
        LogMessage('      Get result year01:'+ItemValue1+'||');


    because is not needed for download the poster and the AddFieldValueXML is after // (commentary) and ItemValue1 is not more used
Tell me if I was wrong in something.
« Last Edit: January 05, 2019, 03:16:20 pm by VVV_Easy_Programing »

Offline ronaldomm

  • Member
  • *
  • Posts: 11
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #151 on: January 05, 2019, 11:31:41 pm »
Hi,

I have been a long time user of this excellent program, but I am with a problem about the filmography of actors in this new version.
After I used the IMDB People [EN] [HTTPS] plugin for an specific actor, it isn't showing his full filmography. Look the exemple attached.

Please, could you help me in this case?

Regards.

Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #152 on: January 06, 2019, 12:36:34 pm »
Hello,
Thanks for your alert, you are right: nowadays the "IMDB People [EN] [HTTPS]" don't retrieve the full actor filmography from IMDB and only shows the fimography of the movies stored in the PVD.
There are several reasons for it:
  • The full person filmography can be in five pages. For instance F. Murray Abraham can be: Actor | Soundtrack | Thanks | Self | Archive footage
  • When you add filmography, PVD create a record for the movie even if it isn't in your collection. For instance, F. Murray Abraham has 188 credits!
  • Finaly, the lack of time for this feature not very much demanded. But it is a good opportunity for you to try to make this script. We will help you with it!

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #153 on: January 06, 2019, 12:58:33 pm »
Hello,
Thanks for your alert, you are right: nowadays the "IMDB People [EN] [HTTPS]" don't retrieve the full actor filmography from IMDB and only shows the fimography of the movies stored in the PVD.
There are several reasons for it:
  • The full person filmography can be in five pages. For instance F. Murray Abraham can be: Actor | Soundtrack | Thanks | Self | Archive footage
  • When you add filmography, PVD create a record for the movie even if it isn't in your collection. For instance, F. Murray Abraham has 188 credits!
  • Finaly, the lack of time for this feature not very much demanded. But it is a good opportunity for you to try to make this script. We will help you with it!

I agree with VVV_Easy. I have been waiting for some time for someone to ask a question about the transfer of filmography information to the IMDb people script. I have also been thinking of inserting code into IMDb people script for downloading filmography in the database. I'll see what to help.

Temporary help if you want to have a filmography can also be an IMDb People plugin that still works with Proxomitron if you know it or have already used it. This is a temporary solution until it is ready code for filmography transfer.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline ronaldomm

  • Member
  • *
  • Posts: 11
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #154 on: January 06, 2019, 03:36:00 pm »
 :)
OK. Thanks for while.
I am going to wait by the definitive solution. For while, i keep using The Proxomitron.
See you.

Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #155 on: January 06, 2019, 08:07:37 pm »
Hi,

I have been a long time user of this excellent program, but I am with a problem about the filmography of actors in this new version.
After I used the IMDB People [EN] [HTTPS] plugin for an specific actor, it isn't showing his full filmography. Look the exemple attached.

Please, could you help me in this case?

Regards.
:)
OK. Thanks for while.
I am going to wait by the definitive solution. For while, i keep using The Proxomitron.
See you.

The solution is already, but it still needs some tests before the release, which you can expect in a day or two.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #156 on: January 07, 2019, 11:21:30 am »
Tell me if I was wrong in something.

I have not yet been able to verify everything if something is missing or it may not be necessary to change anything at the moment.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #157 on: January 07, 2019, 09:09:27 pm »
The solution is already, but it still needs some tests before the release, which you can expect in a day or two.

IMDB_People_ [EN] [HTTPS]+ script now has an added filmography code for transmitting information as well as for Altenative names.

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


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #158 on: January 08, 2019, 09:50:19 am »
IMDB_People_ [EN] [HTTPS]+ script

Quote
Function ParsePage_IMDBPeopleAWARDS(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If żany big problem? with exit
    //Retrieve: AddAward(Event, Award, Category, Recipient, Year, Won)
  Var
    curPos,endPos,endPosAux,index,curPos0,curPos1,curPos2,curPos3,curPos4,endPos0,endPos1,endPos2:Integer;
    MovieURL,ItemList:String;
    ItemArray: TWideArray;
    EventBlock,EventName,EventYear,YearBlock,AwardBlock,AwardName,AwardCategory,AwardRecipient,MovieYear:String;
    AwardWon: Boolean;
  Begin
    LogMessage('Function ParsePage_IMDBPeopleAWARDS BEGIN=====================||');
    Result:=prFinished;  //It will change to prError if any big problem with exit   
.
.
.
                //Recipient Level     
                curPos2:=Pos('<td class="award_description">',AwardBlock);                       //String which opens the AwardCategory and AwardRecipient list data. WEB_SPECIFIC
                While curPos2>0 Do Begin
                    //Get all "raw" list data for create good values separators (not use TextBetWeen)
                    endPos2:=PosFrom('</td>',AwardBlock,curPos2)+Length('</td>');                 //Strings which opens/closes the data. WEB_SPECIFIC
                    ItemList:=Copy(AwardBlock,curPos2,endPos2-curPos2);
                    //LogMessage('           Parse results ('+IntToStr(curPos2)+','+IntToStr(curPos2)+') complex ItemList:'+ItemList+'||');
                    //The Receipt awards ItemList may have:  1) empty description or not have name (not interesting) and break ItemArray[]. 2) Several titles with year 3) Detail o full Notes
                    //So is better search sequentily by token in a block than with ItemArray
                    endPosAux:=PosFrom(#13,ItemList,2);                                        //Strings which opens/closes the data. WEB_SPECIFIC
                    curPos3:=PosFrom('title',ItemList,2);                                       //Strings which opens/closes the data. WEB_SPECIFIC
                    If (endPosAux<curPos3) Or (curPos3=0) Then Begin                            //There is Awardcategory because #13 is befor name or there isn't name. WEB_SPECIFIC
                        curPos4:=1;
                        AwardCategory:=TextBetWeen(ItemList,'<td class="award_description">',#13,false,curPos4);   //Strings which opens/closes the data. WEB_SPECIFIC
                        LogMessage('     Parse Results in AwardCategory:'+AwardCategory+'||');
                        curPos4:=Pos('Shared with:',AwardCategory);                          //WEB_SPECIFIC.
                        If 0<curPos4 then AwardCategory:=Copy(AwardCategory,0,curPos4-1);
                        LogMessage('     Parse Results in AwardCategory0:'+AwardCategory+'||');

                    End Else Begin
                        AwardCategory:='';
                    End;
                    If curPos3=0 Then Begin //Award without Recipient
                    AddAward(EventName, AwardName, AwardCategory, '', EventYear, AwardWon);
                        LogMessage('      Get results Awards:#'+IntToStr(index)+'|'+EventName+'|'+AwardName+'|'+AwardCategory+'|'+''+'|'+EventYear+'|'); //+BoolToStr(AwardWon)+'||');
                    End;
                    While curPos3>0 Do Begin   
                        MovieURL:='http://www.imdb.com/title'+TextBetWeen(ItemList,'<a href="/title','?ref_=nmawd_awd_',true,curPos4)+'/';                                      //Strings which opens/closes the data. WEB_SPECIFIC
                        LogMessage('  **  Parse Results in MovieURL: '+MovieURL);

                        AwardRecipient:=TextBetWeen(ItemList,'>','<',false,curPos3);              //Strings which opens/closes the data. WEB_SPECIFIC
                  LogMessage('      Parse Results in AwardRecipient:'+AwardRecipient+'||');
                        MovieYear:=TextBetWeen(ItemList,'(',')',false,curPos3);                  //Strings which opens/closes the data. WEB_SPECIFIC
                        LogMessage('  **  Parse Results in MovieYear:'+MovieYear);

                        AddAward(EventName, AwardName, AwardCategory, AwardRecipient, EventYear, AwardWon);
                        LogMessage('      Get results Awards:#'+IntToStr(index)+'|'+EventName+'|'+AwardName+'|'+AwardCategory+'|'+AwardRecipient+'|'+EventYear+'|'); //+BoolToStr(AwardWon)+'||');                   
                        //endPosAux:=PosFrom('note',ItemList,curPos3);                            //Strings which opens/closes the data. WEB_SPECIFIC
                  endPosAux:=PosFrom('truncated-note',ItemList,curPos3);                            //Strings which opens/closes the data. WEB_SPECIFIC
                        curPos3:=PosFrom('title',ItemList,curPos3);                              //Strings which opens/closes the data. WEB_SPECIFIC

                  //curPos3:=PosFrom('name',ItemList,curPos3);                              //Strings which opens/closes the data. WEB_SPECIFIC
                        If curPos3>endPosAux Then curPos3:=0                                   //Avoid Names in notes. WEB_SPECIFIC                                                                                                                                     
                    End;
                    curPos2:=PosFrom('<td class="award_description">',AwardBlock,endPos2);        //String which opens the AwardCategory and AwardRecipient list data. WEB_SPECIFIC
                End;
                curPos1:=PosFrom('<td class="award_outcome"',YearBlock,endPos1);               //String which opens the AwardName and Won list data. WEB_SPECIFIC
            End;
            curPos0:=PosFrom('<td class="award_year"',EventBlock,endPos0);                      //String which opens the AwardYearlist data. WEB_SPECIFIC
        End;
        curPos:=PosFrom('<table class="awards"',HTML,endPos);                               //String which detectecs the Event. Search directly '<h3>' is very inconsistent. WEB_SPECIFIC
        index:=index+1;
    End;
    LogMessage('Function ParsePage_IMDBMovieAWARDS END=====================||');
  End; //BlockClose
In ParsePage_IMDBPeopleAWARDS, a few months ago, beauty errors were discovered or found, which had just been corrected or removed. IMDB_People_ [EN] [HTTPS]+ script now correctly transfers the Awards informations.

The revised IMDB_People_ [EN] [HTTPS]+ script  is attached.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Online Ivek23

  • Global Moderator
  • *****
  • Posts: 2737
    • View Profile
Re: Personal Video Database 1.0.2.7 MOD
« Reply #159 on: January 19, 2019, 09:03:46 pm »
Tell me if I was wrong in something.

I have not yet been able to verify everything if something is missing or it may not be necessary to change anything at the moment.

In the near future, I will post corrections in the existing IMDB_ [EN] [HTTPS] script, which will be called IMDB_ [EN] [HTTPS] + script (in a few days, hopefully it will be),  as well as some new scripts such as Plot Summary, Soundtracks and other information. It will also be published separately IMDB_ [EN] [HTTPS] script for Cast & Crew extra informations.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


 

anything