Author Topic: Alternative  (Read 2226 times)

0 Members and 1 Guest are viewing this topic.

Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #60 on: June 08, 2018, 07:35:49 am »
We are near to publish a "complete" beta versión. Some anwsers:
Quote
It is also suggested to add the Technical Specs and User Reviews and Custom Fields codes, since these two were also in the Imdb movie plugin.
In the last beta, I put the Movie Technical Specs in the ~features~ field in all scripts. It seems the "thought" of Nostra for this field.
Today the MOD version has 5 custom fields:
Set (Short Text), TOP_250 (Number), IMDB_Votes (Number), TheMoviedb_Votes (Number), FilmAffinity_Votes (Number)
I would like to use the most of the PVD fields and not have to increase more custom fields until the version was stable.
For instance IMDB_ID is easily got from URL movie: string between the "http://www.imdb.com/title/" and "/" (line 1132-Beta 1).
Quote
... users of the Russian section ...
Great! I suppose there are many Russian PVD users. The translated versions of the scripts are made with ecobyte-ReplaceText and a file translation file text. I'll include this files in the next versión for further languages.
BTW, I don't see too many returns from the users now so I hope that when we publish the first version the people will start using it and telling us their discovers (bugs) and their wishes.
Today, I have two main "concerns": people who leave PVD because it does not work and new people who enter in the PVD page and can not find an easy functional version to use.
« Last Edit: June 08, 2018, 09:01:09 am by VVV_Easy_Programing »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #61 on: June 10, 2018, 07:12:35 am »
The Beta 1 version

IMDB_ [EN] [HTTPS] script


Example:
Poster for Alexander Jamieson movie is in 7200*10800 resolution, which is very too long and long lasts, and then opens for a long time in PVD.

The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.

For the description, it is necessary to change the condemned part of the code with this part of the code added below.
Quote
Function ParsePage_IMDBMovieBASE(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If not results
    //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 GET_FEATURES ~features~
  Var
      debug_pos1:Integer;
      curPos,endPos,index:Integer;
      ItemValue,ItemList:String;
      titleValue:String;
      Name,Role,PersonURL:String;
      IMDb_ID:String;
  Begin
.
.
.
    //Get ~description~
    If Pos('<h2>Storyline</h2>',HTML)>0 then begin
    EndPos:= Pos('<h2>Storyline</h2>', HTML);
    curPos:=Pos('<h2>Storyline</h2>',HTML);                                 //WEB_SPECIFIC.
       If 0<curPos Then Begin
          ItemValue:=TextBetWeen(HTML,'<h2>Storyline</h2>','<span class="see-more inline">',false,curPos);   //Strings which opens/closes the data. WEB_SPECIFIC
          ItemValue := StringReplace(ItemValue, 'Industry information at your fingertips', '', true, false, true);
          ItemValue := StringReplace(ItemValue, 'Some parts of this page won'+#39+'t work property. Please reload or try later.', '', true, false, true);
          debug_pos1:=Pos('Written by',ItemValue);
          if debug_pos1 >0 then ItemValue := Copy(ItemValue,0,debug_pos1-1);
          AddFieldValueXML('description',ItemValue);
          LogMessage('      Get result description:'+ItemValue+'||');
       End;
    End;
This part of the code passes every description, which is and exists on the website.

Small fixes in code sections for Runtime
Quote
        //Get "Runtime" (in minutes)
        curPos:=Pos('<h4 class="inline">Runtime:</h4>',HTML);                                      //WEB_SPECIFIC.
        If 0<curPos Then Begin 
            ItemValue:=TextBetWeen(HTML,'M">',' min</time>',false,curPos);  //Strings which opens/closes the data. WEB_SPECIFIC
            ItemList:=ItemList+'Original Runtime: '+ItemValue+' min.<br>';
            LogMessage('      Get result Original Runtime:'+ItemValue+'||');
            AddFieldValue(mfDuration,ItemValue);
            LogMessage('      Get result lenght:'+ItemValue+'||');
        End;

Sound Mix
Quote
        //Get "Sound Mix" (several values in a comma separated list)
        curPos:=Pos('<h4 class="inline">Sound Mix:</h4>',HTML);
        if 0<curPos then begin       
            ItemValue:=RemoveTags(TextBetWeen(HTML,'<h4 class="inline">Sound Mix:</h4>','</div>',false,curPos), false); //WEB_SPECIFIC.
            ItemValue:=StringReplace(ItemValue,'|        ',', ',True,True,False);                                    //WEB_SPECIFIC.
            ItemValue:=StringReplace(ItemValue,'(', ' (',True,True,False);
            ItemList:=ItemList+'Sound Mix: '+ItemValue+'<br>';
            LogMessage('      Get result Sound Mix:'+ItemValue+'||');
        End;

Color
Quote
        //Get "Color" (several values in a comma separated list)
        curPos:=Pos('<h4 class="inline">Color:</h4>',HTML);
        if 0<curPos then begin       
            ItemValue:=TextBetWeen(HTML,'<h4 class="inline">Color:</h4>','</div>',false,curPos);
            ItemValue:=StringReplace(ItemValue,'|        ',', ',True,True,False);                                    //WEB_SPECIFIC.
            ItemValue:=StringReplace(ItemValue,'(', ' (',True,True,False);

            ItemList:=ItemList+'Color: '+ItemValue+'<br>';
            LogMessage('      Get result Color:'+ItemValue+'||');
        End;
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #62 on: June 10, 2018, 10:07:17 am »
The Beta 2 Release Candidate version with (EN, ES, FR in TheMovieDB) and (ES, EN in FilmAffinity) (you can hide/activate in Script Configuration).

http://vvveasy.altervista.org/wp-content/uploads/2018/06/PersonalVideoDB_MOD-V.Beta_.2.RC_.zip

Beta Testers: Run NOW with "debug.bat". So if you have problems, please is very important the name of the movie and attach the file: PersonalVideoDB\log.txt   

----------------------------------------------------------------------------------------------------------------
"Dirty" own PVD installation/collection adaptation:
Important: Make a secure copy and a test copy of your own actual PDV installation.
Unzip the beta versión and change the folders: Scripts and Plugings of your test copy.
Run PVD in portable mode (portable.bat) without internet proxi.
In Preferences/Movies/Custom Ítems add the fields:
Set (Short Text), TOP_250 (Number), IMDB_Votes (Number), TheMoviedb_Votes (Number), FilmAffinity_Votes (Number)
----------------------------------------------------------------------------------------------------------------
Corrected:
1) Description issues (Ivek23 code).
2) Small fixes in code sections for Runtime (Ivek23 code)
3) Added birthplace in IMDB People
4) IMDB images begin to redirect to HTTPS URL's so added a DownloadImage function in order to download Movie Poster and People Photo by the script and not by PVD Get funtion. Not applied (still?) to the SearchList posters/photos because we would need a lot of intermediate files (better use TheMovieDB script to identify the movie/person and their IMDB ID).

Ivek23:
Quote
The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.

I'm agree and I know that if the script add some numbers in the image url name it can ask for a dowload size, but I don't know very well if it is universal.
Have you some informations or code proposals in this line?
« Last Edit: June 10, 2018, 10:12:26 am by VVV_Easy_Programing »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #63 on: June 10, 2018, 02:32:27 pm »
IMDB_ [EN] [HTTPS] script

The Beta 2 Release Candidate version

Ivek23:
Quote
The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.

I'm agree and I know that if the script add some numbers in the image url name it can ask for a dowload size, but I don't know very well if it is universal.
Have you some informations or code proposals in this line?

Perhaps this part of the code is just the right solution for the resolution of posters.

Quote
    //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_wrapper"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
    If (Length(ItemList)>0) Then Begin           
        titleValue:=TextBetWeenFirst(ItemList,'<h1 itemprop="name" class="">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
        AddFieldValueXML('title',titleValue);
        LogMessage('      Get result title:'+titleValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,'(',')');                                 //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 ItemValue:=BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY1200_.jpg';    //WEB_SPECIFIC
        if ItemValue <> '' then AddImageURL(itPoster,ItemValue)
        else AddImageURL(itPoster,'http://ia.media-imdb.com/images/G/01/imdb/images/logos/imdb_fb_logo-1730868325._CB499606982_.png');

        LogMessage('      Get result poster:'+ItemValue+'||');
    End;

It works, but we'll see more tests if it's really the way it should be.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #64 on: June 10, 2018, 03:09:13 pm »
Also, Imdb Movie Poster script can help in the solution of posters.

[Imdb Movie Poster script is an added.


IMDB_ [EN] [HTTPS] script

The Beta 2 Release Candidate version

Ivek23:
Quote
The proposal for the highest uploaded resolution of the posters should be 1200*1500, which is the limit that then works fine for the good functioning of PVD.

I'm agree and I know that if the script add some numbers in the image url name it can ask for a dowload size, but I don't know very well if it is universal.
Have you some informations or code proposals in this line?

Perhaps this part of the code is just the right solution for the resolution of posters.

Quote
    //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_wrapper"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
    If (Length(ItemList)>0) Then Begin           
        titleValue:=TextBetWeenFirst(ItemList,'<h1 itemprop="name" class="">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
        AddFieldValueXML('title',titleValue);
        LogMessage('      Get result title:'+titleValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,'(',')');                                 //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 ItemValue:=BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY1200_.jpg';    //WEB_SPECIFIC
        if ItemValue <> '' then AddImageURL(itPoster,ItemValue)
        else AddImageURL(itPoster,'http://ia.media-imdb.com/images/G/01/imdb/images/logos/imdb_fb_logo-1730868325._CB499606982_.png');

        LogMessage('      Get result poster:'+ItemValue+'||');
    End;

It works, but we'll see more tests if it's really the way it should be.

._V1_UY1200_.jpg it also works fine in this ._V1_UY2048_.jpg resolution.
« Last Edit: June 10, 2018, 03:26:09 pm by Ivek23 »
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #65 on: June 10, 2018, 04:18:02 pm »
Beta 2 Release Candidate version

IMDB_ [EN] [HTTPS] script

Correction:

Quote
    //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_wrapper"','div class="plot_summary_wrapper">'); //WEB_SPECIFIC.
    If (Length(ItemList)>0) Then Begin           
        titleValue:=TextBetWeenFirst(ItemList,'<h1 itemprop="name" class="">','<');       //Strings which opens/closes the data. WEB_SPECIFIC
        AddFieldValueXML('title',titleValue);
        LogMessage('      Get result title:'+titleValue+'||');
        ItemValue:=TextBetWeenFirst(ItemList,'(',')');                                 //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 ItemValue:=BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY2048_.jpg';    //WEB_SPECIFIC
        // Avoid HTTPS redirection: Download https image to file
        // AddImageURL(itPoster,ItemValue);
        If (1=DownloadImage(ItemValue)) then
        //begin
            AddImageURL(itPoster,GetAppPath+'Scripts\'+BASE_DOWNLOAD_FILE_IMAGE)
            else AddImageURL(itPoster,'http://ia.media-imdb.com/images/G/01/imdb/images/logos/imdb_fb_logo-1730868325._CB499606982_.png');    //Get the photo from a file even if we log the true URL.
            LogMessage('      Get result poster:'+ItemValue+'||');
        //end;

        //if ItemValue <> '' then AddImageURL(itPoster,ItemValue)
        //else AddImageURL(itPoster,'http://ia.media-imdb.com/images/G/01/imdb/images/logos/imdb_fb_logo-1730868325._CB499606982_.png');
        //LogMessage('      Get result poster:'+ItemValue+'||');
    End;
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #66 on: June 10, 2018, 06:23:23 pm »
Beta 2 Release Candidate version

IMDB_ [EN] [HTTPS] script


In the test program folder C:\Users\Public\Portables\PersonalVideoDB\Scripts\ I myself had to create downimage-BIN.jpg, which is missing in the Scripts folder. Please add it to the next version.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #67 on: June 10, 2018, 07:26:42 pm »
Quote
C:\Users\Public\Portables\PersonalVideoDB\Scripts\ I myself had to create downimage-BIN.jpg, which is missing ...
downimage-BIN.jpg is the intermediate file were the new Function DownloadImage(URL) download the image to avoid HTTPS redirection.
In code is "GetAppPath+'Scripts\'+BASE_DOWNLOAD_FILE_IMAGE".
Perhaps the URL BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY2048_.jpg' don't exists for all movies.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #68 on: June 10, 2018, 08:07:08 pm »
Quote
C:\Users\Public\Portables\PersonalVideoDB\Scripts\ I myself had to create downimage-BIN.jpg, which is missing ...
downimage-BIN.jpg is the intermediate file were the new Function DownloadImage(URL) download the image to avoid HTTPS redirection.
In code is "GetAppPath+'Scripts\'+BASE_DOWNLOAD_FILE_IMAGE".
Perhaps the URL BASE_URL_IMAGE_PRE + ItemValue + '._V1_UY2048_.jpg' don't exists for all movies.

For the time being, we will be able to see what will happen on several tests. If necessary, we will drop the resolution to ._V1_UY1800_.jpg .
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #69 on: June 10, 2018, 08:11:37 pm »
In the Russian section of the forum they ask if they can help. I invited everyone who understands English to get help. I also added a link to this topic.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #70 on: June 10, 2018, 09:01:29 pm »
Function DownloadImage(URL)  return 1 if it can get a file from the url and 0 if not exist this file.
With this funtionality the script can try severals resolutions from the no resized URL.
For instance: try  '._V1_UY2048_.jpg'
      if not exists try with '._V1_UY1800_.jpg'
      else with ' '._V1_UY1200_.jpg'
      else with original no resized URL.

In the end, the objetif is not download a big poster ... and 1200 points of heigth is a good size.
« Last Edit: June 10, 2018, 09:12:39 pm by VVV_Easy_Programing »

Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #71 on: June 11, 2018, 08:52:34 pm »
I do as I have said in the last post (see line 501 in the attached script) with a user parameter MAX_IMAGE_HEIGTH = 1200;
Tell me if this script works OK with Alexander Jamieson movie in your Win 7 installation (that uses curl).
If it works OK I will do the same in the IMDB People script and we can thought to apply in the SearchList.

By the way, I have notice that IMDB reduces the download speed if you do a lot of ask or if the page is not popular: Tehn the script ask to the user Retry. If you have a lot of this problems we can increase the INTERNET_TEST_ITERATIONS   = 5; before to ask the user.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2120
    • View Profile
Re: Alternative
« Reply #72 on: June 11, 2018, 09:24:52 pm »
I do as I have said in the last post (see line 501 in the attached script) with a user parameter MAX_IMAGE_HEIGTH = 1200;
Tell me if this script works OK with Alexander Jamieson movie in your Win 7 installation (that uses curl).
If it works OK I will do the same in the IMDB People script and we can thought to apply in the SearchList.

It works perfectly, this can be done as mentioned.

By the way, I have notice that IMDB reduces the download speed if you do a lot of ask or if the page is not popular: Tehn the script ask to the user Retry. If you have a lot of this problems we can increase the INTERNET_TEST_ITERATIONS   = 5; before to ask the user.

It can be repaired more than it is now, and more on this problem, when these problems start to occur frequently.
Ivek23
Win 7 32bit, 64bit   PVD v0.9.9.21


Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #73 on: June 12, 2018, 08:04:24 pm »
The Beta 3 Release Candidate version with (EN, ES, FR in TheMovieDB) and (ES, EN in FilmAffinity) (you can hide/activate in Script Configuration).

http://vvveasy.altervista.org/wp-content/uploads/2018/06/PersonalVideoDB_MOD-V.Beta_.3.RC_.zip

Beta Testers: Run NOW with "debug.bat". So if you have problems, please is very important the name of the movie and attach the file: PersonalVideoDB\log.txt   

----------------------------------------------------------------------------------------------------------------
"Dirty" own PVD installation/collection adaptation for normal users:
Important: Make a secure copy and a test copy of your own actual PDV installation.
Unzip the beta versión and change the folders: Scripts and Plugings of your test copy.
Run PVD in portable mode (portable.bat) without internet proxi.
In Preferences/Movies/Custom Ítems add the fields:
Set (Short Text), TOP_250 (Number), IMDB_Votes (Number), TheMoviedb_Votes (Number), FilmAffinity_Votes (Number)
----------------------------------------------------------------------------------------------------------------
Corrected:
1) Now all the IMDB images are downloaded by PVdBDownPage.exe so no more problems with HTTPS (but is slower because the need of file).
2) The poster and photo heigth are script paremeter in 1200.
3) The images for SearchList are downloaded in heigth 200.
4) The INTERNET_TEST_ITERATIONS   is now a script user parameter.
5) I belive that IMDB slow the download if detects several ask. I recomended use TheMovieDB first time in order to get the IMDB URL of movies and in people.
« Last Edit: June 13, 2018, 09:53:37 am by VVV_Easy_Programing »

Offline VVV_Easy_Programing

  • Power User
  • ****
  • Posts: 174
    • View Profile
Re: Alternative
« Reply #74 on: June 16, 2018, 10:17:06 am »
Happily, we have finished the "Beta" phase in the PVD MOD and move on to "Release" state.
So, we closed this topic now and we continue in the new topic:

Personal Video Database 1.0.2.7 MOD
http://www.videodb.info/forum_en/index.php/topic,4134.0.html

See you all there.  ;D



 

anything