281
Support / Re: Episodes TV Series Problem
« on: September 19, 2021, 07:41:22 am »Hooray! Finally! Thank you very much!!!
Welcome.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Hooray! Finally! Thank you very much!!!
Thank you Ivek. I am most obliged to you ! I will be waiting for your news.
Best regards, George
Thanks again Ivek for your help. Here are compressed my PVD 1.0.2.7 PSF files.
I checked them again this morning, in order to add Season 3 to TV series https://www.imdb.com/title/tt5932548/?ref_=tt_ov_inf
(Britannia), but nothing is imported !
Will be waiting for your comments.
Regards, George
Thank you Ivek for yr quick reply. I will wait for your information, when you have the time to correct the psf files for the IMDB.
How can I upload all Imdb scripts used in my version 1.0.2.7 of PVD, since only 4 are permitted ?
Kind regards, George
Thank you Ivek for yr quick reply.
I have many questions but, I will ask you only the basic:
1) Is the MOD version working with the current IMDB layout ?
2) Can I transfer my database to the MOD version easily?
3) From your answers, I understand that some scripts might work -if modified- but most work will be manual copy & paste of IMDB data, as I have done up to now.
4) Your last paragraph has some Russian words which I don't understand what you mean. You want me to upload all psf files used for IMDB ?
"The IMDbMoviesUrl custom field now also has a link to the OMDb API website."
Where is this "custom field" located? Can I have a screen, please!
See screenshot for memo IMDb Movies Url custom box.
Screenshots are attached.
What is it?
P.S. What are the other Amadeus subclauses? Wildly curious! How much time do you spend adding information to one movie? (If anything, then this is a rhetorical question.)
P.P.S. THANK YOU!!!
"The IMDbMoviesUrl custom field now also has a link to the OMDb API website."
Where is this "custom field" located? Can I have a screen, please!
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
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
//OBLIGATORY CALLBACK PRINCIPAL FUNCTION=========================================================================BlockOpen
Function ParsePage(HTML:String;URL:AnsiString):Cardinal; //BlockOpen
Var
MovieID,titleValue,yearValue:String;
ResultTmp:Cardinal;
Date:String;
Fullinfo,Movie_URL,IMDB_URL: String;
DateParts: TWideArray;
Begin
LogMessage('Function ParsePage BEGIN======================|');
LogMessage('Global Var-Mode|'+IntToStr(Mode)+'|');
LogMessage('Global Var-DownloadURL|'+DownloadURL+'|');
LogMessage(' Local Var-URL|'+URL+'|');
//Parse return in mode 'Search Movie URL'--------------------------------------------------------------------------------
If (Mode=smSearch) Then Begin
titleValue:=GetFieldValueXML('origtitle');
If (Length(titleValue)=0) Then titleValue:=GetFieldValueXML('title');
yearValue:=GetFieldValueXML('year');
If yearValue='0' Then yearValue:=''; // Better no Year (blank) for the searches.
LogMessage(' ParsePage smSearch|'+IntToStr(Mode)+'|. Searching DownloadURL for MovieTitle |'+ titleValue+'|'+' MovieYear |'+ yearValue+'|');
//Download Provider search page.
DownloadURL:=StringReplace(BASE_URL_SEARCH_PROV,'%s',titleValue,True,True,False);
DownloadURL:=StringReplace(DownloadURL,' ','+',True,True,False); //Better list of results without spaces.
DownloadURL:=StringReplace(DownloadURL,'%y',yearValue,True,True,False);
LogMessage(' Searching in Provider:|' + DownloadURL + '||');
HTML:=DownloadPage(DownloadURL); //True page for parsing the search
//HTML:=FileToString( GetAppPath + '\Scripts\IMDB_[EN][HTTPS].v.1.0.0.0\' + 'V.1.0.0.0-IMDb-[Advanced.Search]-Padrino.htm'); //Debug
HTML:=HTMLToText(HTML);
Result:=ParsePage_IMDBSearchTitle(HTML);
If ((Result=prError) and SEARCH_ENGINE) Then Begin //No results or Redirection -> Search Engine needed
LogMessage(' Not results or Redirection in Provider search, try with Bing');
//Download Bing search page.
DownloadURL:=StringReplace(BASE_URL_SEARCH_ENGI,'%p',BASE_URL_PRE_TRUE,True,True,False); //WEB_SPECIFIC
DownloadURL:=StringReplace(DownloadURL,'%s',titleValue,True,True,False); //WEB_SPECIFIC
DownloadURL:=StringReplace(DownloadURL,' ','+',True,True,False); //Better list of results without spaces. WEB_SPECIFIC
DownloadURL:=StringReplace(DownloadURL,'%y',yearValue,True,True,False); //WEB_SPECIFIC
LogMessage(' Searching in Bing:|' + DownloadURL + '||');
HTML:=DownloadPage(DownloadURL); //True page for parsing the search
HTML:=HTMLToText(HTML);
Result:=ParsePage_BingSearch(HTML);
End;
//Parse the returned result of the search list.
If Result=prError Then Begin //Not movie found, script finish in error.
Mode:=smFinished;
LogMessage('Function ParsePage smSearch-prError END======================|');
End;
If Result=prList Then Begin //One list of results loaded, needed user choice exit in the script mode (because HTTPS PVD NOT directly will download the user choice).
Mode:=smSearchList;
LogMessage('Function ParsePage smSearch-prList END======================|');
End;
If Result=prDownload Then Begin //One results, exit needed only continue the script.
Mode:=smNormal;
LogMessage('Function ParsePage smSearch-prDownload END======================|');
End;
Exit;
End;
//Parse return of 'SearchList Movie URL'-----------------------------------------------------------------------
If (Mode=smSearchList) Then Begin //The user have choose the link.
LogMessage(' ParsePage mode smSearchList. Getting DownloadURL from the return of smSearchList');
DownloadURL:=StringReplace(URL,CHEAT_PREFIX_URL,'',True,False,False); //Eliminate the CHEAT_PREFIX_URL for get the true movie link
DownloadURL:=StringReplace(DownloadURL,'http:','https:',True,True,False); //The direct url needed (no https redirection)
LogMessage(' Global Var-DownloadURL|'+DownloadURL+'|');
Mode:=smNormal;
Result:=prDownload; //But not exit needed for download the page because is HTTPS
LogMessage(' With the good movie URL it demand download the movie page');
End;
//Parse with the Movie URL 'smNormal'------------------------------------------------------------------------------------
If (Mode=smNormal) Then Begin
//Get the script Overwrite Options saved in pvdconf.ini (Remember that PVD only save the options on exit)
//0=Do nothing,1=Set if Empty,2=Overwrite
PVDConfigOptions:=TextBetWeenFirst(FileToString(GetAppPath+'pvdconf.ini'),'IMDB_[EN][HTTPS].psf=',Chr(13));
//LogMessage('Stored Script PVDConfigOptions is:'+PVDConfigOptions+'||');
//LogMessage('The Script option of position '+ IntToStr(opPoster) +' is:'+Copy(PVDConfigOptions,opPoster,1)+'||');
Result:=prFinished; //It will change to prError if any big problem with exit;
//Information in several page. Needs Provider MovieID
MovieID:=TextBetWeenFirst(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_SUF);
LogMessage(' ParsePage mode smNormal|'+IntToStr(Mode)+'|. Getting provider data for MovieID|'+ MovieID +'|');
AddCustomFieldValueByName('IMDbID',MovieID);
AddCustomFieldValueByName('IMDbID:',MovieID);
LogMessage(' Get result IMDbID (CF~IMDbID~):'+MovieID+'||');
//Get ~url~
if (0=Pos(BASE_URL_PRE,StoredURL)) then begin //Write the url if not exists
AddFieldValueXML('url',StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False));
LogMessage(' Get result url:'+StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False)+'||');
end;
//Get ~IMDb Movie Url~
Movie_URL:=StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False);
AddCustomFieldValueByName('IMDb.com','<link url="'+Movie_URL+'">IMDb.com</link>');
AddCustomFieldValueByName('IMDbMoviesUrl','<link url="'+Movie_URL+'">IMDb MovieUrl</link> <link url="http://www.omdbapi.com/">OMDb API info</link> <link url="http://www.omdbapi.com/apikey.aspx">OMDb API Key</link>');
//AddCustomFieldValueByName('OMDbAPIUrl','<link url="'+Movie_URL+'">IMDb MovieUrl</link> <link url="http://www.omdbapi.com/?i='+MovieID+'&apikey=[yourkey]&plot=short&tomatoes=true">OMDb API info for IMDb</link> <link url="http://www.omdbapi.com/?i='+MovieID+'&apikey=[yourkey]&plot=full&tomatoes=true">OMDb API full info for IMDb</link> <link url="http://www.omdbapi.com/?i='+MovieID+'&apikey=[yourkey]&plot=full&r=xml&tomatoes=true">OMDb API full xml info for IMDb</link> <link url="http://www.omdbapi.com/?s='+GetFieldValueXML('title')+'&apikey=[yourkey]&plot=short&tomatoes=true">OMDb API Search for IMDb</link>');
LogMessage(' Get result Movie_url: '+Movie_URL+' ||');
LogMessage(' Get result OMDb API info_URL:'+#13+'<link url="http://www.omdbapi.com/">OMDb API info</link> <link url="http://www.omdbapi.com/apikey.aspx">OMDb API Key</link>'+'||')
Fullinfo:='';
//Fullinfo:=Fullinfo+'<link url="'+Movie_UR+'">Maindetails</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'">MainPage</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'reference">Reference</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'fullcredits">Full Cast&Crew</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'awards">Awards</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'releaseinfo">ReleaseDates</link> ';
//Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'technical">TechnicalSpecs</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'technical">TechSpecs</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'parentalguide">ParentsGuide</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'keywords">PlotKeywords</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'plotsummary">PlotSummary</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'locations">FilmLocations</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'taglines">Taglines</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'companycredits">CompanyCredits</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'movieconnections">Connections</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'soundtrack">Soundtracks</link> ';
//Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites">Miscellaneous</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites">MiscSites</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites#photos">MiscPhoto</link> ';
Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'mediaindex">PhotoGallery</link> ';
//Fullinfo:=Fullinfo+'<link url="'+Movie_URLL+'externalsites#misc">MiscSites</link> ';
//Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites#photos">MiscPhoto</link> ';
If Fullinfo <> '' then IMDB_URL:=Fullinfo;
If IMDB_URL <> '' then AddCustomFieldValueByName('IMDb Movie Url',IMDB_URL);
LogMessage(' Get result Fullinfo-IMDB_URL (CF~IMDb Movie Url~ ):'+#13+IMDB_URL+'||')
//Parse principal provider page = BASE_URL_PRE_TRUE------------------------------------------------------------------
//Get ~MID ID:~ and ~NUM ID::~
AddCustomFieldValueByName('MID ID:',GetFieldValueXML('mid'));
LogMessage(' ** Movie MID ID: '+GetFieldValueXML('mid')+' **');
if GetFieldValueXML('num') <> '0' then AddCustomFieldValueByName('NUM ID:',GetFieldValueXML('num'));
if GetFieldValueXML('num') <> '0' then LogMessage(' * Movie NUM ID: '+GetFieldValueXML('num')+' ||');
//Get ~origtitle~
ItemValue:=TextBetWeenFirst(ItemList,'","name":"','","'); //Strings which opens/closes the data. WEB_SPECIFIC
If (Length(ItemValue)=0) Then ItemValue:=titleValue; //Provider hides the original title if same that title. WEB_SPECIFIC
AddFieldValueXML('origtitle',ItemValue);
AddCustomFieldValueByName('Origtitle',ItemValue);
LogMessage(' Get result origtitle:'+ItemValue+'||');
//Get ~alternatetitle~
ItemValue:=TextBetWeenFirst(ItemList,'","alternateName":"','","'); //Strings which opens/closes the data. WEB_SPECIFIC
AddCustomFieldValueByName('Localized title',ItemValue);
if ItemValue <> '' then LogMessage(' Get result alternatetitle:'+ItemValue+'||');
//Get "Certification" info
curPos:=Pos('<td class="ipl-zebra-list__label">Certification</td>',HTML);
if (curPos=0) then Exit;
EndPos:=curPos;
//Get "Certification" info
curPos:=Pos('<td class="ipl-zebra-list__label">Certification</td>',HTML);
If 0<curPos Then Begin
EndPos:=curPos;
ItemValue1:=HTMLValues2(HTML,'<td class="ipl-zebra-list__label">Certification</td>','</section>','<li class="ipl-inline-list__item">','</li>','<br> • ',EndPos); //WEB_SPECIFIC.
ItemValue1:=StringReplace(ItemValue1,':',': ',True,False,True);
ItemValue1:=StringReplace(ItemValue1,' (',' (',True,False,True);
AddCustomFieldValueByName('Certification','Certification<br> • '+ItemValue1);
LogMessage(' Certification:<br>'+ItemValue1+'||');
//Script Options-------------------------------------------------------------------------------------------------------
//Retreive Data Config
.
.
.
// GET_FULL_PLOT_SUMMARY = True ; //Set to False to not wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Comment box.
GET_FULL_PLOT_SUMMARY = False ; //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Comment box.
// MAX_IMAGE_HEIGTH = 1200; //Heigth limit of the stored posters.
MAX_IMAGE_HEIGTH = 500; //Heigth limit of the stored posters.
//Process Data Config
// ~Plot Summary~
If (Pos('It looks like we don'+Chr(39)+'t have any Summaries for this title yet.',HTML)>0) then Exit;
//Get "Summaries" info (~Comment~)
If Pos('<h1 class="header">Plot</h1>',HTML)>0 Then Begin
curPos:=Pos('<h1 class="header">Plot</h1>',HTML);
EndPos:=curPos;
ItemValue:=HTMLValues2(HTML,'Plot','See also','<li class="ipl-zebra-list__item" id="summary','</p>','<br><br>-------<br><br>',EndPos);
ItemValue:=StringReplace(ItemValue,'<a href='+Chr(39),'<link url="'+GetFieldValueXML('url'),True,False,True);
ItemValue:=StringReplace(ItemValue,'?ref_='+Chr(39)+'>',+'">',True,False,True);
ItemValue:=StringReplace(ItemValue,'</a>','</link>',True,False,True);
LogMessage(' Get result ItemValue (~Comment~):'+ItemValue+'||');
End;
the script "Imdb_Movie (list of episodes).psf" completely stopped importing information about the number of seasons and episodes (!pic1.jpg). Is it possible to fix this and pass this function to some other script, please? For example "IMDB_ [EN] [HTTPS] (episodes) .psf".
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.