Author Topic: IMDB_[EN][HTTPS] new site layout script  (Read 27120 times)

0 Members and 3 Guests are viewing this topic.

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
IMDB_[EN][HTTPS] new site layout script
« on: July 05, 2021, 09:12:43 pm »
Why is it deleted. I was lucky to download new IMDB test script and to test it. It looks like it works. Thankyou so much Ivek, that was blazingly fast. Those aka and connections links looked like they worked.

Can you please let me know where should I implement that custom Title field pice of code from previous script:


       
Code: [Select]
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+'||');

Thank you in advance
« Last Edit: July 30, 2021, 10:43:55 pm by afrocuban »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: What happened with my topic?
« Reply #1 on: July 06, 2021, 12:45:35 pm »
Quote from: afrocuban
Quote
http://mailmirdoch.net/index.php?topic=41.msg114#msg114
Scripts that stopped working (for me...)
« on: 01 July 2021, 22:49:22 »
Is it only me, or:
1. AllMovie doesn't import plot anymore
2. FA doesn't find movies anymore
3. IMDb script doesn't find movies anymore too?

Reproduced with:
The Nest (2020) https://www.imdb.com/title/tt8338762/
The Courier (2020) https://www.imdb.com/title/tt8368512/
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: 2711
    • View Profile
Re: What happened with my topic?
« Reply #2 on: July 06, 2021, 01:02:26 pm »
I was also surprised that your topic is gone. I apologize to everyone if I may have accidentally deleted the topic, but as far as I can remember for yesterday, I didn’t do it.

This is not currently in the test script, but will be added to the final version. IMDB_ [EN] [HTTPS] _Test script test version added.
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: 468
    • View Profile
Re: What happened with my topic?
« Reply #3 on: July 06, 2021, 06:05:02 pm »
Thanks. It also looks whole http://mailmirdoch.net/index.php forum is gone... No subforums, no topics, at least on my side...

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: What happened with my topic?
« Reply #4 on: July 18, 2021, 12:50:47 am »
Do you by any chance know when testing period will be over, so I could put that piece of code in the script, Ivek? Test script works flawlessly as I can tell.

Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: What happened with my topic?
« Reply #5 on: July 18, 2021, 01:49:17 pm »
I was also surprised that your topic is gone. I apologize to everyone if I may have accidentally deleted the topic, but as far as I can remember for yesterday, I didn’t do it.

This is not currently in the test script, but will be added to the final version. IMDB_ [EN] [HTTPS] _Test script test version added.
problems importing information for the movie "http://www.imdb.com/title/tt0142920/" (and some others) (script: IMDB_ [EN] [HTTPS] _Test)
year, Category, Country, Studio, MPAA,
Thank's
« Last Edit: July 18, 2021, 02:51:56 pm by Pacifist »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: What happened with my topic?
« Reply #6 on: July 19, 2021, 07:41:21 pm »
I was also surprised that your topic is gone. I apologize to everyone if I may have accidentally deleted the topic, but as far as I can remember for yesterday, I didn’t do it.

This is not currently in the test script, but will be added to the final version. IMDB_ [EN] [HTTPS] _Test script test version added.
problems importing information for the movie "http://www.imdb.com/title/tt0142920/" (and some others) (script: IMDB_ [EN] [HTTPS] _Test)
year, Category, Country, Studio, MPAA,
Thank's

Thanks for the feedback.

IMDb does not have or does not know the information for the Category field. Country, Studio, and some others have a record with one or more records (there was already a code to download multiple records), so it was necessary to add code to download one record. For MPAA information is now added custom memo Certification field so you can check if there is MPAA Certification for Spain or USA country because in the script the code is only for these two countries. If there is no MPAA Certification for Spain or USA country, then the MPAA field is blank or there is no transfer of MPAA information.

IMDB_ [EN][HTTPS]_RC  script is added.
« Last Edit: July 19, 2021, 07:48:03 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 Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: What happened with my topic?
« Reply #7 on: July 19, 2021, 07:54:17 pm »
Do you by any chance know when testing period will be over, so I could put that piece of code in the script, Ivek? Test script works flawlessly as I can tell.

In a week or two, when I get positive feedback for the IMDB_ [EN] [HTTPS] _RC script.

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


Offline jondak

  • User
  • ***
  • Posts: 33
    • View Profile
Re: What happened with my topic?
« Reply #8 on: July 19, 2021, 09:29:24 pm »
Hello,

For the Country Field:

    curPos:=Pos('<span class="ipc-metadata-list-item__label">Countries of origin</span>',HTML);                                      //WEB_SPECIFIC.
    If 0<curPos Then Begin
      EndPos:=curPos;
      ItemValue:=HTMLValues(HTML,'<span class="ipc-metadata-list-item__label">Countries of origin</span>','</ul>','<li role="presentation" class="ipc-inline-list__item">','</li>',', ',endPos);

becomes:

    curPos:=Pos('<span class="ipc-metadata-list-item__label">Country of origin</span>',HTML);                                      //WEB_SPECIFIC.
    If 0<curPos Then Begin
      EndPos:=curPos;
      ItemValue:=HTMLValues(HTML,'<span class="ipc-metadata-list-item__label">Country of origin</span>','</ul>','<li role="presentation" class="ipc-inline-list__item">','</li>',', ',endPos);


They replaced in the page Countries of origin with Country of origin  ( both test and RC version)

I've tested with 2 movies only as its late here and worked

Offline Borea

  • Member
  • *
  • Posts: 17
    • View Profile
Re: What happened with my topic?
« Reply #9 on: July 20, 2021, 02:11:39 am »
The IMDB _RC script works fine with me. Thanks Ivek.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: What happened with my topic?
« Reply #10 on: July 20, 2021, 06:26:56 am »
Hello,

For the Country Field:

    curPos:=Pos('<span class="ipc-metadata-list-item__label">Countries of origin</span>',HTML);                                      //WEB_SPECIFIC.
    If 0<curPos Then Begin
      EndPos:=curPos;
      ItemValue:=HTMLValues(HTML,'<span class="ipc-metadata-list-item__label">Countries of origin</span>','</ul>','<li role="presentation" class="ipc-inline-list__item">','</li>',', ',endPos);

becomes:

    curPos:=Pos('<span class="ipc-metadata-list-item__label">Country of origin</span>',HTML);                                      //WEB_SPECIFIC.
    If 0<curPos Then Begin
      EndPos:=curPos;
      ItemValue:=HTMLValues(HTML,'<span class="ipc-metadata-list-item__label">Country of origin</span>','</ul>','<li role="presentation" class="ipc-inline-list__item">','</li>',', ',endPos);


They replaced in the page Countries of origin with Country of origin  ( both test and RC version)

I've tested with 2 movies only as its late here and worked

I will explain why twice the code for For the Country Field.

For example:

for the movie " http://www.imdb.com/title/tt0086879/ " (Amadeus) must use this code
Code: [Select]
    curPos:=Pos('<span class="ipc-metadata-list-item__label">Countries of origin</span>',HTML);                                      //WEB_SPECIFIC.
    If 0<curPos Then Begin
      EndPos:=curPos;
      ItemValue:=HTMLValues(HTML,'<span class="ipc-metadata-list-item__label">Countries of origin</span>','</ul>','<li role="presentation" class="ipc-inline-list__item">','</li>',', ',endPos);
for the script to download Country information.

for the movie " http://www.imdb.com/title/tt0142920/ " (Tokugawa irezumi-shi: Seme jigoku) or for the movie " http://www.imdb.com/title/tt0214388/ " (100 Girls) must use this code
Code: [Select]
    curPos:=Pos('<span class="ipc-metadata-list-item__label">Country of origin</span>',HTML);                                      //WEB_SPECIFIC.
    If 0<curPos Then Begin
      EndPos:=curPos;
      ItemValue:=HTMLValues(HTML,'<span class="ipc-metadata-list-item__label">Country of origin</span>','</ul>','<li role="presentation" class="ipc-inline-list__item">','</li>',', ',endPos);
for the script to download Country information.

Because no code was added in IMDB_ [EN] [HTTPS] _Test script for one country, script did not download any Country information.

The same is true and is still in use for origlang and studio code.
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: 2711
    • View Profile
Re: What happened with my topic?
« Reply #11 on: July 20, 2021, 06:28:52 am »
The IMDB _RC script works fine with me. Thanks Ivek.

Thanks for the positive feedback.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline jondak

  • User
  • ***
  • Posts: 33
    • View Profile
Re: What happened with my topic?
« Reply #12 on: July 20, 2021, 08:42:06 am »
Thank you,

didn't know they use different labels if there are multiple countries. Though they change it in the site redesign.

Testing RC now

Cheers.


Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Thanks!!! But:
movie Nomad (http://www.imdb.com/title/tt9770150/), problems
1) genres
2) budget
3) whether it is possible to control the "COMMENTS" line (on / off). Often this only duplicates the "DESCRIPTION".
P.S. we are waiting for a new version of the script "IMDB_ [EN] [HTTPS] (episodes) .psf" and "IMDB_ [EN] [HTTPS] (series) .psf"  ;)
Thank you very much!!!
« Last Edit: July 21, 2021, 10:30:47 am by Pacifist »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: What happened with my topic?
« Reply #14 on: July 22, 2021, 01:14:21 pm »
Thanks!!! But:
movie Nomad (http://www.imdb.com/title/tt9770150/), problems
1) genres
2) budget

There was the same problem with genres as in the case already mentioned and described above. As for the budget, however, the transfer of information is only when the website in the Box office has a Budget record. Otherwise, there is no transfer of Budget information when there is no Budget record on the website in the Box office.

3) whether it is possible to control the "COMMENTS" line (on / off). Often this only duplicates the "DESCRIPTION".

There may be multiple duplicates of "COMMENTS" record in the "DESCRIPTION" field, but usually the record in the "DESCRIPTION" field is only one summaries record, while in the "COMMENTS" field there is a full synopsis record. Below are links to more comparisons for the 13 Going on 30 (2004) movie.

movie " 13 Going on 30 (2004) https://www.imdb.com/title/tt0337563/ "
 
https://www.imdb.com/title/tt0337563/plotsummary?ref_=tt_stry_pl#summaries
https://www.imdb.com/title/tt0337563/plotsummary?ref_=tt_stry_pl#synopsis


There will be an option in the script to manually set the setting to true or false to the "COMMENTS" field (//Script Options). There will also be a synopsis memo field custom.


Quote
//Script Options

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.

P.S. we are waiting for a new version of the script "IMDB_ [EN] [HTTPS] (episodes) .psf" and "IMDB_ [EN] [HTTPS] (series) .psf"  ;)

As for the new script updates for the series and episodes, it will take a little longer due to the new layout of the Main IMDb websites. Now the source code notation has changed a lot, which causes quite a few headaches so that certain information can be found about where it is written. As a result, it also causes problems for the correct way to write code in a script to download certain information.

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


Offline Pacifist

  • User
  • ***
  • Posts: 68
    • View Profile
Re: What happened with my topic?
« Reply #15 on: July 23, 2021, 09:47:35 am »
Thanks!!!

Offline afrocuban

  • Moderator
  • *****
  • Posts: 468
    • View Profile
Re: IMDB_[EN][HTTPS] new site layout script
« Reply #16 on: July 31, 2021, 08:20:52 pm »
Thank you Ivek

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: IMDB_[EN][HTTPS] new site layout script
« Reply #17 on: August 08, 2021, 11:51:49 am »
Here is the new final IMDB_ [EN] [HTTPS] V 1.4.2.0 script version at the link below.

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

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: 2711
    • View Profile
Re: IMDB_[EN][HTTPS] new site layout script
« Reply #18 on: September 19, 2021, 08:14:45 am »
At the moment, I can only test certain scripts because I am waiting for the HDD that was in my Win 7 computer (this computer stopped working for me). Only after I get this disc (most likely I will get it this or next week), only then will I be able to get to the other scripts and data on it.

Then I will also update the other IMDb scripts as soon as possible and it will be possible to update them to the new IMDb layout.
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: 2711
    • View Profile
Re: IMDB_[EN][HTTPS] new site layout script
« Reply #19 on: September 26, 2021, 08:28:39 am »
Here is a new test IMDB_ [EN] [HTTPS] _RC3 script where some new pieces of code and options have been added to the script.

To the afrocuban user's problem of transferring alternate title information to the Title normal field, options are now added to change the original title to the local movie title if there is a translation in your country. The options are set as before to transfer the original or alternate address. However, each user now manually sets these options. In addition, the Title normal field must then be marked so that when the information is transferred, only this information will also change to the Title normal field.


Quote
//Script Options-------------------------------------------------------------------------------------------------------
  //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_ORIGINAL_TITLE  = True ;  //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field. 
//  GET_ORIGINAL_TITLE  = False ;  //Download the alternate title info in your language in your country in of the principal movie page if it exists there for to replace the original title in the Title field.
//  GET_LOCAL_TITLE  = True ;  //Download the alternate title info in your language in your country in of the principal movie page if it exists there.
  GET_LOCAL_TITLE  = False ;  //Download the alternate title info in your language in your country in of the principal movie page if it exists there. 

  GET_FULL_MPAA  = True ;  //Download Certification provider page for retreive the MPAA info. Otherwise only the info of the principal movie page.
  GET_FULL_AKA  = True ;  //Download 'Also Known As' provider page for retreive the info. Otherwise only the info of the principal movie page.
  GET_FULL_CREDIT  = True ;  //Download Cast or Credit provider page for retreive the info. Otherwise only the info of the principal movie page.
  PEOPLE_LIMIT  = 25;    //Limit of number of actors (cast) or of credits (crew) retrieved.
  GET_FULL_AWARDS  = True ;  //Download Awards provider page for retreive the info. Otherwise doesn't do nothingh because no info in the principal movie page.
  EVENTS_LIMIT  = 100;   //Limit of number of events (USA Academy Awards, Golden Globes, etc) to retrive awards.
  GET_FULL_FEATURES  = True ; //Download Technical Specs for retreive the original movie features (Runtime, Sound Mix, Color, Aspect Ratio, etc).
  //GET_FULL_FEATURES  = False ; //Download Technical Specs for retreive the original movie features (Runtime, Sound Mix, Color, Aspect Ratio, etc).
  GET_MINI_FEATURES  = True ; //Download Technical Specs for retreive the original movie features (Runtime, Sound Mix, Color, Aspect Ratio).
  //GET_MINI_FEATURES  = False ; //Download Technical Specs for retreive the original movie features (Runtime, Sound Mix, Color, Aspect Ratio).
  //GET_FEATURES  = True ; //Download Technical Specs for retreive the original movie features (Runtime, Sound Mix, Color, Aspect Ratio).
  GET_FEATURES  = False ; //Download Technical Specs for retreive the original movie features (Runtime, Sound Mix, Color, Aspect Ratio).

  GET_FULL_PLOTKEYWORDS  = True ;  //Download Plot Keywords provider page for retreive the Plot Keywords info. Otherwise only the info of the principal movie page
  PLOTKEYWORDS_LIMIT  = 100;  //Limit of number of tags retrieved only when download Plot Keywords provider page.
  GET_FULL_PLOTSUMMARY  = True ;  //Download Plot provider page for retreive the Summaries info. Otherwise only the info of the principal movie page
//  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
  PRESERVE_PVD_DESCRIPTION_SETTING  = True ; //Avoid double use of ~description~ and ~comment~ using only the user check fields table selection otherwise try get "plot_summary"
  //Process Behaviour Config
  BYPASS_SILENT  = True ;  //Ensure critical ShowMessage alerts bypassing Silent PVdB preferences
  CHECK_WEBSITE  = False ;  //Add to SearchResult List the true HTTPS links 'Just to check the website' with the browser
  POSTER_IN_SEARCH  = True ;//Download and show movie posters in the list of the SearchResult
  SEARCH_ENGINE  = True ;  //If there isn't provider search results, try with Bing search engine
  INTERNET_TEST_ITERATIONS  = 6;  //Attempts before to alert user that not internet connection detected. Increase if the provider has low speed.
//Script data------------------------------------------------------------------------------------------------------------

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.
   //LogMessage('           Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList: '+'<script type="application/ld+json"'+ItemList+'}</script>'+'||');
    If (Length(ItemList)>0) Then Begin
   
        //Get ~title~
        titleValue:=TextBetWeenFirst(ItemList,'","name":"','","');       //Strings which opens/closes the data. WEB_SPECIFIC
        If titleValue = '0' then titleValue:='';
        //If titleValue = '' then titleValue:=TextBetWeenFirst(ItemList,'<h1 class="long">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
        if GET_ORIGINAL_TITLE then AddFieldValueXML('title',titleValue);
      AddCustomFieldValueByName('Title',titleValue);
      //AddCustomFieldValueByName('Localized title',titleValue);
        LogMessage('      Get result title:'+titleValue+'||');
      
        //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 GET_LOCAL_TITLE then AddFieldValueXML('title',ItemValue);
        if ItemValue <> '' then LogMessage('      Get result alternatetitle:'+ItemValue+'||');      
      //Get ~IMDB_Movietype~
      ItemValue:=TextBetWeenFirst(ItemList,'","@type":"','","');   //Strings which opens/closes the data. WEB_SPECIFIC
      MediaType:=ItemValue;
      MediaType:=StringReplace(MediaType,'TVEpisode','TV Episode',True,False,True);
      MediaType:=StringReplace(MediaType,'TVSeries','TV Series',True,False,True);
      AddCustomFieldValueByName('IMDB_Movietype',MediaType);
      if ItemValue <> '' then LogMessage('      Get result MediaType (CF~IMDB_Movietype~):'+MediaType+'||');
      //Get ~IMDB_MPAA~   
      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+'||');       
      //(*
      //Get ~posters~
      ItemValue:=TextBetWeenFirst(ItemList,BASE_URL_IMAGE_PRE_TRUE,'.');                 //Get poster code. Strings which opens/closes the data. WEB_SPECIFIC
      if ItemValue <> '' then LogMessage('      Get result poster000: '+ItemValue+' ||');
        If ((Length(ItemValue)>0) and Not(USE_SAVED_PVDCONFIG and (Copy(PVDConfigOptions,opPoster,1)='0'))) then begin  //The Poster will be saved in PVDthen begin
            ItemValue:=BASE_URL_IMAGE_PRE_TRUE + ItemValue;                             //Base poster URL without '.jpg'. WEB_SPECIFIC
            LogMessage('      Get result poster00: '+ItemValue+' ||');
            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: ' + #13 + 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 poster0: ' + #13 + ItemValue + '.jpg'+' ||');
            end;
        End; 
      //*)   
      //Get ~year~   
      //ItemValue1:=TextBetWeenFirst(ItemList,'"datePublished": "','-');
      ItemValue1:=TextBetWeenFirst(ItemList,',"datePublished":"','-');
      //ItemValue1:=TextBetWeenFirst(ItemList,'},"datePublished":"','-');      
        AddFieldValueXML('year',ItemValue1);
        if ItemValue1 <> '' then LogMessage('      Get result year01:'+ItemValue1+'||');
      //Get ~rdate~~IMDB Release Date~
      //ItemValue:=TextBetWeenFirst(ItemList,'"datePublished": "','",');   //Strings which opens/closes the data. WEB_SPECIFIC
      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;
      //Get ~IMDB_Votes~
      ItemValue:=TextBetWeenFirst(ItemList,'","ratingCount":',',"');   //Strings which opens/closes the data. WEB_SPECIFIC
      AddCustomFieldValueByName('IMDB_Votes',ItemValue);
       AddCustomFieldValueByName('IMDB Votes',ItemValue);
       AddCustomFieldValueByName('IMDB Votes:',ItemValue);      
      if ItemValue <> '' then LogMessage('      Get result ratingCount (~IMDB_Votes~): '+ItemValue+' ||');   
      //Get ~imdbrating~~IMDB Rating~~IMDBRating~
      //ItemValue:=TextBetWeenFirst(ItemList,'"ratingValue": "','"');   //Strings which opens/closes the data. WEB_SPECIFIC
      ItemValue:=TextBetWeenFirst(ItemList,'"worstRating":1,"ratingValue":','},"');   //Strings which opens/closes the data. WEB_SPECIFIC   
      //ItemValue:=FloatToStr((StrToFloat(ItemValue) * 1));
      AddFieldValueXML('imdbrating',ItemValue);
      AddCustomFieldValueByName('IMDB Rating',ItemValue);
      AddCustomFieldValueByName('IMDBRating',ItemValue);
      if ItemValue <> '' then LogMessage('      Get result ratingValue ~imdbrating~ (CF~IMDB Rating~~IMDBRating~): '+ItemValue+' ||');
    End;      
   
   //(*         
    //Go to "Tv Mode"    
   StartPos:=Pos('<h1 textlength="',HTML);
   if StartPos>0 then begin   
      ItemValue:=HTMLValue(HTML,StartPos,0,'<li role="presentation" class="ipc-inline-list__item">','releaseinfo?ref_=tt_ov_rdat');
      if ItemValue <> '' then LogMessage('      Get result Tv Mode1:'+ItemValue+'||');
      debug_pos1:=Pos('<a href="',ItemValue);
      if debug_pos1 >0 then ItemValue := Copy(ItemValue,0,debug_pos1-1);
      AddCustomFieldValueByName('Tv',ItemValue);      
      if ItemValue <> '' then LogMessage('      Get result Tv Mode (CF~Tv~):'+ItemValue);
      ItemValue1:=HTMLValues(HTML,'<h1 textlength="','</ul>','"ipc-inline-list__item">','</',', ',StartPos);   
      AddCustomFieldValueByName('Tv2',ItemValue1);   
      if ItemValue1 <> '' then LogMessage('      Get result Tv Mode01:'+#13+ItemValue1+'||'+#13);      
   end else
      LogMessage('tv-metadata not found');         
   //*)   

Added code for Tv Mode, whose information is transferred to the multiselect custom Tv field and to the long text Tv2 custom field.

Also added memo IMDB Plot Summary and Imdb Aka custom fields.

Added code for MiniSoundtracks, whose information is transferred to the memo MiniSoundtracks custom field from the main IMDb website.

The same is added for Technical Specs, whose information is transferred to the Imdb TechSpecs custom memo field from the main IMDb website.


Quote
       End;     
        if (Length(ItemList)>0) then begin
         AddCustomFieldValueByName('Imdb TechSpecs',ItemList);      
            if GET_FEATURES then AddFieldValueXML('features',ItemList);

            LogMessage('      Get result Movie Features:'+ItemList+'||');
        End;
    End;      
   //(*         
    //Go to "Soundtracks" ~crew~ctComposers   
   StartPos:=Pos('Soundtracks</a>',HTML);
   if StartPos>0 then begin   
      ItemValue:=HTMLValue(HTML,StartPos,0,'<div><span class="soundtrack-','</div>');
      if ItemValue <> '' then LogMessage('      Get result Soundtracks1:'+#13+ItemValue+'||'+#13);
      ItemValue:=StringReplace(ItemValue,'trackname">','',True,False,True);      
      ItemValue:=StringReplace(ItemValue,'</span>',#13,True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-1">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-2">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-3">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-4">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-5">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-6">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-7">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-8">','',True,False,True);
      ItemValue:=StringReplace(ItemValue,'<span class="soundtrack-comment-9">','',True,False,True);      
      ItemValue:=StringReplace(ItemValue,'<a class="ipc-md-link ipc-md-link--entity" href="','<link url="http://www.imdb.com',True,False,True);
      ItemValue:=StringReplace(ItemValue,'</a>','</link>',True,False,True);            
      AddCustomFieldValueByName('MiniSoundtracks',ItemValue);
      if ItemValue <> '' then LogMessage('      Get result Soundtracks (CF~MiniSoundtracks~):'+#13+ItemValue+#13);
   end else
      LogMessage('soundtrack not found');         
   //*)   

A multiselect Imdb Aspect Ratio custom field is also added.

Short text IMDB Release Date and IMDB Release Dates custom fields are also added, so you have the option to check the correct Release Date record in the normal rdate field.

IMDB_ [EN][HTTPS]_RC3  script is added.
« Last Edit: October 28, 2021, 07:22:51 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