English > Talk
Alternative
Ivek23:
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;
--- End quote ---
Ivek23:
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.
VVV_Easy_Programing:
--- Quote ---C:\Users\Public\Portables\PersonalVideoDB\Scripts\ I myself had to create downimage-BIN.jpg, which is missing ...
--- End quote ---
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.
Ivek23:
--- Quote from: VVV_Easy_Programing 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 ...
--- End quote ---
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.
--- End quote ---
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:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version