//SCRIPT INFO================================================================================================== BlockOpen (*Following until 'SCRIPT CONSTANTS...' is documentation. Please see 'USER OPTIONS' in the body of the script. --------------------------------------------- AUTHORS: VVV_Easy Contact Web: http://contactbyweb.com/vvv-easy --------------------------------------------- CHANGE LOG : V 1.4.2.8 (22/03/2023) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_1 version V 1.4.2.7 (09/01/2023) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_2 version V 1.4.2.6 (28/06/2022) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_2 version V 1.4.2.5 (28/06/2022) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_1 version V 1.3.1.0 (22/11/2018) Ivek23: ParsePage_IMDBMovieAKA small change in the source code and was missing the name for the country. V 1.3.0.0 (28/10/2018) New parameter USE-SAVED-PVDCONFIG for avoid download page if the Overwrite Options of the Script in the pvdconf.ini are 'Do Nothing'. Remember that PDV only save the pvdconf.ini in exit. V 1.0.0.0 (20/05/2018) VVV: Initial public release --------------------------------------------- FIELD USE: The Personal Video DataBase field names in comments are enclosed in "~" so they are easier to find in the script. The WEB_SPECIFIC commentary points out the specific text for Web fields. Use Log PVdB debug Window for looking search errors. Important note: This scripts don't use the GET PVdB function for download page (this allows use HTTPS pages). For do that it use a specific program "PVdBDownPage" AutoHotKey script. You can get it from the authors page: http://vvveasy.altervista.org/personal-video-database/ NEEDED EXTERNAL FILES IN SCRIPTS FOLDER: • %Path%\PVdBDownPage.exe FOOTNOTES: 1.Control the use of standard fields using the "Overwrite Fields" plugin preferences in the main program PVD: Preferences > Plugins > 'Script Name' > Overwrite fields to control how these items are to be updated. 2.Hits for adapt the Script. 2.1. Search WEB_SPECIFIC comentary for adapt the specific Web text of fields. 2.2. Script execution: 0) Get results of "Obligatory callback Functions" 1) GetDownloadURL (Obligatory callback Functions) = This function should return URL that should be downloaded byd by the main application and then passed to the script’s ParsePage function as text. It may have several modes selon the Script mode (Global Var Mode = smSearch, smNormal, smFinished). 2) ParsePage (Obligatory callback Functions) = This function receives the text of the download web page passeded to the main application in the GetDownloadURL function. It has several modes selon the Script mode (Global Var Mode = smSearch, smNormal, smFinished). KNOWN ISSUES: 1. For compiling cuestions functions must be defined in the script before use (not in order of execution). 2. For the search texts for locating the fields in Web page Null '' value it's not valid. You must replaces all escaped HTML characters (like <>&") with normal characters (like <, >,$, "). 3. If desired, you needs Custom Fields ~IMDB_Votes~,~TOP_250~ for storing the number of votes and TOP250 IMDB list. 4. If not or bad MPAA USA then get Spain certification (if exist) and convert in USA-KODI values. If even this fails try to get of the "user" folders name. s try to get of the "user" folders name. 5. Cast & Crew field info names: • Directed by • Writing Credits // NO (WGA) • Cast (in credits order) // Only data info in normal Actors field • Produced by • Music by • Cinematography by // NO • Thanks SCRIPT STRUCTURE: 1.Script data and user options constants 2.Some useful generic constants 3.Global variables 4.Obligatory PVD callback Functions GetScriptVersion, GetScriptName, GetScriptDesc, GetBaseURL, GetScriptLang, GetScriptType, GetCurrentMode, GetDownloadURL. (Note: ParsePage is at the end of the file for compiling cuestions). 5.Optional PVD callback Functions GetRatingName ,GetCodePage, GetDownloadMethod, GetPrefixMode; 6.User Functions an procedures (with their constans) 7.Obligatory PVD callback function ParsePage (at the end of the file for compiling cuestions) *) //SCRIPT INFO================================================================================================== BlockClose //SCRIPT CONSTANTS============================================================================================= BlockOpen Const //Script types----------------------------------------------------------------------------------------------------------- stMovies = 0; stPeople = 1; stPoster = 2; stScreenShots = 3; stCover = 4; //Script Obligatory Infos---------------------------------------------------------------------------------------------- SCRIPT_NAME = 'IMDB_[EN][HTTPS] (Plot Keywords)'; //The most complete information provider SCRIPT_DESC = 'IMDB download Plot Keywords info [EN]'; SCRIPT_VERSION = '1.4.3.0.'; //SCRIPT_VERSION = '1.3.1.5.'; SCRIPT_TYPE = stMovies; SCRIPT_LANG = $09; //English //$0a es-Spanish $0c fr-French $09 en-English RATING_NAME = 'IMDB'; //PVD has ~imdbrating~ for this value CODE_PAGE = 65001; //28591=ISO 8859-1 Latin 1; Western European (ISO). Use: 65001=Unicode (UTF-8) | 0=for Autodetect Autodetect //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_AKA = False ; //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_LIMITS = 18; //Limit of number of actors (cast) or of credits (crew) retrieved on Main 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_FILMLOC = True ; //Download Filming & Production provider page for retreive the info. Otherwise doesn't do nothingh because no info in the principal movie page. GET_FULL_CONNECTIONS = True ; //Download Connections provider page for retreive the MovieConnections info. Otherwise no info of the Connections provider page. 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. 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. CONNECT_LIMIT = 100; 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. PLOTKEYWORDS_LIMIT = 50; //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_PLOTSUMMARY = False ; //Download Plot provider page for retreive the Summaries info. Otherwise only the info of the principal movie page // GET_FULL_PLOT_SYNOPSIS = True ; //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Custom IMDB Synopsis box. // GET_FULL_PLOT_SYNOPSIS = False ; //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Custom IMDB Synopsis box. // GET_FULL_PLOT = True ; //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Plot info in Custom Plot Summary box. GET_FULL_PLOT = False ; //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Plot info in Custom Plot Summary box. GET_FULL_TAGLINES = True ; //Download Taglines provider page for retreive the Taglines info. Otherwise only the info of the principal movie page. GET_FULL_SOUNDTRAKCS = True ; //Download Taglines provider page for retreive the Soundtracks info. Otherwise only the info of the principal movie page GET_FULL_EXTERNAL = True ; //Download External sites provider page for retreive the External sites info. Otherwise only the info of the principal movie page. GET_REFERENCE = True ; //Download Description and Taglines from Reference View . . // 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 = True ; //Add to SearchResult List the true HTTPS links 'Just to check the website' with the browser //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------------------------------------------------------------------------------------------------------------ //Used Web URL BASE_URL_PRE = 'http://www.imdb.com/title/'; //The traditional BASE_URL_PREFIX used to get movie ID if the movie is stored for instance 'http://www.imdb.com/title/ tt0068646/'. BASE_URL_PRE_TRUE = 'https://www.imdb.com/title/'; //True actual link to movie ID 'httpS://www.imdb.com/title/ tt0068646/' BASE_URL_PERSON_PRE = 'http://www.imdb.com/name/'; //The traditional BASE_UR to person ID 'httpS://www.imdb.com/name/ nm0094036/' BASE_URL_PERSON_PRE_TRUE = 'https://www.imdb.com/name/'; //True actual link to person ID 'httpS://www.imdb.com/name/ nm0094036/' BASE_URL_SUF = '/'; //Suffix in the link after MovieID or PersonID 'http://www.imdb.com/title/ tt0068646 /' BASE_URL_IMAGE_PRE = 'http://ia.media-imdb.com/images/M/'; //IMDB posters format: Full image: 'https://ia.media-imdb.com/images/M/MV5BMTI2MjI4NTgyNF5BMl5BanBnXkFtZTcwOTM5NzQ5MQ@@.jpg. BASE_URL_IMAGE_PRE_TRUE = 'https://m.media-amazon.com/images/M/'; //Resized image: 'https://ia.media-imdb.com/images/M/MV5BMTI2MjI4NTgyNF5BMl5BanBnXkFtZTcwOTM5NzQ5MQ@@._V1_UY50_CR0,0,34,50_AL_.jpg // where the two last number are width and heigth BASE_URL_MPAA ='http://www.imdb.com/title/%IMDB_ID/parentalguide?ref_=tt_stry_pg#certification'; //Certification provider page. WEB_SPECIFIC. //BASE_URL_AKA ='https://www.imdb.com/title/%IMDB_ID/releaseinfo?ref_=tt_dt_dt#akas'; //Also Known As provider page. WEB_SPECIFIC. //BASE_URL_AKA ='https://www.imdb.com/title/%IMDB_ID/releaseinfo?ref_=tt_dt_aka#akas'; //Also Known As provider page. WEB_SPECIFIC. BASE_URL_AKA ='https://www.imdb.com/title/%IMDB_ID/releaseinfo/?ref_=tt_ql_sm#akas'; //Also Known As provider page. WEB_SPECIFIC. BASE_URL_CAST ='https://www.imdb.com/title/%IMDB_ID/fullcredits?ref_=tt_cl_sm#cast'; //Cast provider page. WEB_SPECIFIC. BASE_URL_AWARDS='https://www.imdb.com/title/%IMDB_ID/awards?ref_=tt_awd'; //Awards provider page. WEB_SPECIFIC. BASE_URL_FILMLOC='https://www.imdb.com/title/%IMDB_ID/locations?ref_=tt_dt_loc'; //Technical Specifications provider page. WEB_SPECIFIC. BASE_URL_TECH='https://www.imdb.com/title/%IMDB_ID/technical?ref_=tt_spec'; //Technical Specifications provider page. WEB_SPECIFIC. BASE_URL_CONNECTIONS='https://www.imdb.com/title/%IMDB_ID/movieconnections/?ref_=tt_trv_cnn'; //Connections provider page. WEB_SPECIFIC. BASE_URL_PLOTKEYWORDS='https://www.imdb.com/title/%IMDB_ID/keywords?ref_=tt_stry_kw'; //Plot KeyWords provider page. WEB_SPECIFIC. BASE_URL_PLOTSUMMARY='https://www.imdb.com/title/%IMDB_ID/plotsummary?ref_=tt_stry_pl'; //Plot provider page. WEB_SPECIFIC. BASE_URL_TAGLINES='https://www.imdb.com/title/%IMDB_ID/taglines/?ref_=tt_ql_'; //Taglines provider page. WEB_SPECIFIC. BASE_URL_SOUNDTRAKCS='https://www.imdb.com/title/%IMDB_ID/soundtrack/?ref_=tt_ql_'; //Soundtrakcs provider page. WEB_SPECIFIC. BASE_URL_EXTERNAL='https://www.imdb.com/title/%IMDB_ID/externalsites/?ref_=tt_ql_'; //External sites provider page. WEB_SPECIFIC. BASE_URL_REFERENCE='https://www.imdb.com/title/%IMDB_ID/reference'; //Reference provider page. WEB_SPECIFIC. BASE_URL_SEARCH_PROV ='https://www.imdb.com/search/title?title=%s&title_type=feature&release_date=%y,%y&view=simple&count=10'; //Search string for '%s' title and '%y' year. WEB_SPECIFIC //'&count=50' //BASE_URL_SEARCH_PROV = 'http://www.imdb.com/find?q=%s&s=tt&view=simple'; //Ivek23 proposition //BASE_URL_SEARCH_PROV = 'http://www.imdb.com/find/?s=tt&q=%s&view=simple'; //Ivek23proposition http://www.imdb.com/find?q=Ninja+Resurrection&s=tt BASE_URL_PERSON_SEARCH_PROV ='https://www.imdb.com/search/name?name=%s&sort=starmeter+desc&ref_=rlm'; //Search string for '%s' name. WEB_SPECIFIC MAX_SEARCHLIST_HEIGTH = 200; //Heigth limit of the search list posters. BASE_URL_SEARCH_ENGI = 'http://www.bing.com/Search?q=%s%20+(%y)+site%3A%p'; // Search string: '%s' title , '%y' year and '%p' web information provider. //Download HTTPS needed parameters BASE_URL_ROUNDABOUT = 'ROUNDABOUT'; //Used for cheat GET PVdB funtion and rondabout the "https" fail. BASE_DOWNLOAD_FILE_NO_BOM = 'Tmp\downpage-UTF8_NO_BOM.htm'; //File to store curl page download in UTF8 without BOM and then it's not necesary use GET PVdB funtion to download. BASE_DOWNLOAD_FILE_IMAGE_NAME = 'Tmp\downimage-BIN'; //File to store curl image download in binary and then it's not necesary use GET PVdB funtion to download. CHEAT_PREFIX_URL = 'http://httpbin.org/response-headers?key='; //Working http URL used for cheat GET PVdB funtion when it returns for SearchList choice. DUMMY_HTML_FILE = 'portable.bat'; //Any existing PVdV file (little) not used. If adapted, it may external file 'C:\Windows\notepad.exe' //Script movie modes.---------------------------------------------------------------------------------------------------- smSearch = 0; //Entry mode and search list mode (AddSearchResult) smNormal = 1; //This scripts download with external program (not with GetDownloadURL) so it only make one pass to ParsePage for retrieve all info, credits, poster, etc. other field modes aren't necesary. //Movie PVdB fields in http://www.videodb.info/help/hlp_scripting.html#fields: //Certification (AddValueField): ~mpaa~ //Credits (AddMoviePerson): ~Directors~,~Writers~,~Composers~,~Photographers~,~Actors~,~Producer~.Same that smCast.hat smCast. //Votes (AddValueField): ~rating~,~imdbrating~,~orname~,~orating~ and related custom PVdB fields ~IMDB_Votes~,~TOP_250~,~FilmAffinity_Votes~. //Poster (AddValueImageURL): ~poster~,~screenshots~,~froncover~,~cdcover~ //Review (AddValueField): ~comment~,~tags~ //Awards (AddAwards). smSearchList = 8; //Used in ParsePage for demands download the https link returned by user in the window of (AddSearchResult)SearchResult) smFinished = 9; //For set script finish. //Parse results (return of Script)--------------------------------------------------------------------------------------- prError = 0; //An error acquired while processing data prFinished = 1; //Script has finished gathering data prList = 2; //A list of search results is available. Use with (AddSearchResult) prListImage = 3; //A list of image search results is available. Use with? prDownload = 4; //Another URL needs to be downloaded //Download methods------------------------------------------------------------------------------------------------------- dmGET = 0; dmPOST = 1; //Credits types---------------------------------------------------------------------------------------------------------- ctActors = 0; ctDirectors = 1; ctWriters = 2; ctComposers = 3; ctProducers = 4; //Image types------------------------------------------------------------------------------------------------------------ itPoster = 0; itScreenShot = 1; itFrontCover = 2; itDiscImage = 3; itPhoto = 4; //Field Overwrite Options position in pvdconf.ini------------------------------------------------------------------------ //0=Do nothing,1=Set if Empty,2=Overwrite. The Length of 'IMDB_[EN][HTTPS].psf=' is 21. opPoster = 87-21; opAKA = 24-21; opDirector = 76-21; opProducer = 79-21; opWriter = 77-21; opComposer = 78-21; opActors = 75-21; opMPAA = 27-21; opAwards = 85-21; opFeatures = 55-21; opConnections = 84-21; opEpisodes = 92-21; //Custom field names to use------------------------------------------------------------------------ THANKS_FIELD = 'Thanks Credits'; FOLLOWEDBY_FIELD = 'Followed By'; //SCRIPT CONSTANTS============================================================================================= BlockClose //SCRIPT GLOBAL VARIABLES=======================================================================================BlockOpen Var Mode:Byte; DownloadURL:String; StoredURL:String; MediaType:String; //'Movie''TV Episode' 'TV Series' PVDConfigOptions:String; fullinfo4:String; //SCRIPT GLOBAL VARIABLES=======================================================================================BlockClose //OBLIGATORY CALLBACK FUNCTIONS=================================================================================BlockOpen Function GetScriptVersion:String; //BlockOpen Begin Result:=SCRIPT_VERSION; End; //BlockClose Function GetScriptName:String; //BlockOpen Begin Result:=SCRIPT_NAME; End; //BlockClose Function GetScriptDesc:String; //BlockOpen Begin Result:=SCRIPT_DESC; End; //BlockClose Function GetBaseURL:AnsiString; //BlockOpen Begin Result := BASE_URL_ROUNDABOUT; //Used for cheat GET PVdB funtion and rondabout the "https" fail. End; //BlockClose Function GetScriptLang:Cardinal; //BlockOpen Begin Result:=SCRIPT_LANG; End; //BlockClose Function GetScriptType:Byte; //BlockOpen Begin Result:=SCRIPT_TYPE; End; //BlockClose Function GetCurrentMode:Byte; //BlockOpen Begin Result:=Mode; End; //BlockClose Function GetDownloadURL:AnsiString; //BlockOpen Var curPos:Integer; ScriptPath,MovieID:String; Begin LogMessage('Function GetDownloadURL BEGIN======================|'); LogMessage('Global Var-Mode|'+IntToStr(Mode)+'|'); LogMessage('Global Var-DownloadURL|'+DownloadURL+'|'); //Comprobation of needed external files. ScriptPath:=GetAppPath+'Scripts\'; If Not(FileExists(ScriptPath+'PVdBDownPage.exe')) Then Begin ShowMessage ('This script needs the external file for work.'+Chr(13)+'• PVdBDownPage.exe'+Chr(13)+'Read script text for futher information',SCRIPT_NAME); Mode:=smFinished; Result:=''; //If error returns empty string exit; End; If (Mode=smSearch) Then Begin //Get stored URL if exist. StoredURL:=GetFieldValueXML('url'); LogMessage('Stored URL is:'+StoredURL+'||'); //Standarize the URL StoredURL:=LowerCase(StoredURL); StoredURL:=StringReplace(StoredURL,'https','http',True,True,False); StoredURL:=StringReplace(StoredURL,'http://imdb.com/', 'http://www.imdb.com/', True,True,False); StoredURL:=StringReplace(StoredURL,'http://httpbin.org/response-headers?key=','',True,False,False); StoredURL:=StringReplace(StoredURL,' ',BASE_URL_SUF,True,True,False)+BASE_URL_SUF; //Asure that the URLs always finish BASE_URL_SUF (even in the last position //Get IMDB ID if exist. curPos:=Pos(BASE_URL_PRE,StoredURL); If 0Go to function ParsePage for parse the film information Result:=GetAppPath+DUMMY_HTML_FILE; //Any existing little file for cheating PVdB automatic download (little).). LogMessage('Function GetDownloadURL END====================== with Mode='+IntToStr(Mode)+' Result='+Result+'|'); exit; End Else Begin //The movie URL not exist, search mode needed. Download the search page. //ShowMessage('No IMDB URL.',SCRIPT_NAME); LogMessage(' No IMDB URL.'); Mode:=smSearch; //->Go to function ParsePage for search the URL (in this funtion you can't not use user funtions)ntions) DownloadURL:=''; //Has not movie URL. Result:=GetAppPath+DUMMY_HTML_FILE; //Any existing little file for cheating PVdB automatic download (little).). LogMessage('Function GetDownloadURL END====================== with Mode='+IntToStr(Mode)+' Result='+Result+'|'); exit; //Go to the End; End; //Not other modes working needs in this function. //smNormal = 1; //This scripts download with external program (not with GetDownloadURL) so it only make one pass to ParsePage for retrieve all info, credits, poster, etc. other field modes aren't necesarye pass to ParsePage for retrieve all info, credits, poster, etc. other field modes aren't necesary //smSearchList = 8; //Used in ParsePage for demands download the https link returned by user in the window of (AddSearchResult)(AddSearchResult) Result:=GetAppPath+DUMMY_HTML_FILE; //Any existing little file for cheating PVdB automatic download (little). LogMessage('Function GetDownloadURL END====================== with Mode='+IntToStr(Mode)+' Result='+Result+'|'); exit; End; //BlockClose Function GetRatingName:String; //BlockOpen Begin Result:=RATING_NAME; End;//BlockClose Function GetCodePage:Cardinal; //BlockOpen Begin Result:=CODE_PAGE; End; //BlockClose //OBLIGATORY CALLBACK FUNCTIONS=================================================================================BlockClose //USER FUNCTIONS AND PROCEDURES=================================================================================BlockOpen Function DownloadPage(URL:AnsiString):String; //BlockOpen //Returns the URL page text. If error returns empty string Var i:Integer; ScriptPath,WebText:String; Begin LogMessage(Chr(9)+Chr(9)+'Function DownloadPage BEGIN======================|'); LogMessage(Chr(9)+Chr(9)+'Global Var-DownloadURL|'+DownloadURL+' |'); LogMessage(Chr(9)+Chr(9)+' Local Var-URL|'+URL+' |'); ScriptPath:=GetAppPath+'Scripts\'; //LogMessage(Chr(9)+Chr(9)+' Local Var-ScriptPath|'+ScriptPath+'|'); //Delete the ancient dowloaded page file. Needed for wait to curl download included in PowerShell command. While FileExists(ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM) Do Begin FileExecute('cmd.exe', '/C del "'+ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM+'"'); LogMessage(Chr(9)+Chr(9)+' Waiting 1s for delete:'+ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM); wait (1000); End; //Download the URL page. LogMessage(Chr(9)+Chr(9)+' Download with PVdBDownPage in file:|'+ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM+' the information of:|'+URL+' ||'); FileExecute(ScriptPath+'PVdBDownPage.exe', '"'+URL+'" "'+ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM+'"'); //Wait download finish and exist the downloaded page. i:=0; // INTERNET_TEST_ITERATIONS While Not(FileExists(ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM)) Do Begin LogMessage(Chr(9)+Chr(9)+' Waiting 2s for exists of:'+ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM); wait (2000); i:=i+1; If i=INTERNET_TEST_ITERATIONS Then Begin if 2=MessageBox('Too many faulty attempts to internet connection.'+Chr(13)+ 'Retry or Cancel?',SCRIPT_NAME,5) then begin LogMessage(Chr(9)+Chr(9)+'Function DownloadPage END with NOT INTERNET connection ===============|'); Result:=''; Exit; End; i:=0; End; End; LogMessage(Chr(9)+Chr(9)+' Now present complete page file: '+ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM); WebText:=FileToString(ScriptPath+BASE_DOWNLOAD_FILE_NO_BOM); WebText:=ConvertEncoding(WebText, 65001); //65001 utf-8 Unicode (UTF-8) ---> https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers //LogMessage(Chr(9)+Chr(9)+' Local Var-WebText|'+WebText+'|'); //Debug statement Result:=WebText; //Some download data comprobations. if (Pos('404 Not Found',Result)>0) then begin //Banned IP. WEB_SPECIFIC. If BYPASS_SILENT Then ShowMessage('The URL is not in use (404 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)+' 404 Not Found|'); Result:=''; //Fatal error End; 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; if (Pos('Too many request',Result)>0) then begin //Banned IP. WEB_SPECIFIC. If BYPASS_SILENT Then ShowMessage('The provider has banned your IP (Too many request).'+Chr(13)+'Go to the provider web and resolve the captcha in order to'+Chr(13)+'demostrate you are not a robot',SCRIPT_NAME); LogMessage(Chr(9)+Chr(9)+' Banned IP|'); Result:=''; //Fatal error End; LogMessage(Chr(9)+Chr(9)+'Function DownloadPage END======================|'); exit; End; //BlockClose Function DownloadImage(URL:AnsiString;OutPutFile:AnsiString):Integer; //BlockOpen //Returns 1 or 0 if the downloaded image file exists in Exit. Var i:Integer; ScriptPath:String; Begin LogMessage(Chr(9)+Chr(9)+'Function DownloadImage BEGIN======================|'); LogMessage(Chr(9)+Chr(9)+'Global Var-DownloadURL|'+DownloadURL+' |'); LogMessage(Chr(9)+Chr(9)+' Local Var-URL|'+URL+' |'); LogMessage(Chr(9)+Chr(9)+' Local Var-OutPutFile|'+OutPutFile+'|'); ScriptPath:=GetAppPath+'Scripts\'; //Delete the ancient dowloaded page file. Needed for wait to curl download included in PowerShell command. While FileExists(OutPutFile) Do Begin FileExecute('cmd.exe', '/C del "'+OutPutFile+'"'); LogMessage(Chr(9)+Chr(9)+' Waiting 1s for delete:'+OutPutFile); wait (1000); End; //Download the URL page. LogMessage(Chr(9)+Chr(9)+' Download with PVdBDownPage in file:|'+OutPutFile+' the information of:|'+URL+' ||'); FileExecute(ScriptPath+'PVdBDownPage.exe', '"'+URL+'" "'+OutPutFile+'"'); //Wait download finish and exist the downloaded page. i:=0; // INTERNET_TEST_ITERATIONS While Not(FileExists(OutPutFile)) Do Begin LogMessage(Chr(9)+Chr(9)+' Waiting 2s for exists of:'+OutPutFile); wait (2000); i:=i+1; If i=INTERNET_TEST_ITERATIONS Then Begin //In the images download the scritp can not ask to the user for internet conexion because perhaps the file doesn't exist. LogMessage(Chr(9)+Chr(9)+'Function DownloadImage END with NOT file downloaded ===============|'); Result:=0; exit; End; End; LogMessage(Chr(9)+Chr(9)+' Now present complete page file: '+OutPutFile); Result:=1; LogMessage(Chr(9)+Chr(9)+'Function DownloadImage END======================|'); exit; End; //BlockClose 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 RemoveTagsEx0(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('(',Result,1); E:=PosFrom(')',Result,B); While (B>0) AND (B',Result); End; End; //BlockClose function RemoveTagsEx_1(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('<',Result,1); E:=PosFrom('>',Result,B); While (B>0) AND (B',Result); End; End; //BlockClose function RemoveTagsEx_2(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('

',Result,B); While (B>0) AND (B',Result); End; End; //BlockClose function RemoveTagsEx1(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('
',Result,B); While (B>0) AND (B',Result); End; End; //BlockClose function RemoveTagsEx20(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('',Result,B); While (B>0) AND (B',Result); End; End; //BlockClose function RemoveTagsEx21(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('
',Result,B); While (B>0) AND (B',Result); End; End; //BlockClose function RemoveTagsEx40(AText:String):String; //BlockOpen //Ivek23 function for get faster the script Var B,E:Integer; Begin Result:=AText; B:=PosFrom('
','|',True,True,False); curPos:=Pos('tp://ogp.me/ns#"',ItemList); If 0','|',True,True,False); ItemList:=RemoveTags(ItemList, False); //LogMessage(' Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||'+#13); LogMessage(' Parse results ItemList:'+#13+ItemList+' ||'); //LogMessage(' Parse results ItemList: '+ItemList+' ||'); //(* ExplodeString(ItemList,ItemArray,'|'); For index:=Low(ItemArray) To High(ItemArray) Do Begin //Remember index begin in 0 If (index=PLOTKEYWORDS_LIMIT) Then break; //Limited depassed. Compares with = (not with >) because index begin in 0 ItemValue:=ItemValue+ItemArray[index]+', '; LogMessage(' Get result Keyword: #'+IntToStr(index+1)+' | '+ItemArray[index]+', '+'||'); End; index:=index+1; If ItemValue <> '' then AddFieldValueXML('tags',ItemValue); LogMessage(' Get result Plot Keywords: '+ItemValue+'||'); //*) End; //*) LogMessage('Function ParsePage_IMDBMoviePLOTKEYWORDS END=====================||'); End; //BlockClose //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; Fullinfo1,MovieID1:String; 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 +'|'); //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; //Parse principal provider page = BASE_URL_PRE_TRUE------------------------------------------------------------------ HTML:=DownloadPage(DownloadURL); //True page for parsing If (0=Length(HTML)) Then begin //Download error in principal page Result:=prError; Exit; End; HTML:=HTMLToText(HTML); Result:=ParsePage_IMDBMovieBASE(HTML); //Parse Plot Keywords provider page = BASE_URL_PLOTKEYWORDS--------------------------------------------------------------------------- If GET_FULL_PLOTKEYWORDS Then Begin DownloadURL:=StringReplace(BASE_URL_PLOTKEYWORDS,'%IMDB_ID',MovieID,True,True,False); HTML:=DownloadPage(DownloadURL); //True page for parsing HTML:=HTMLToText(HTML); ResultTmp:=ParsePage_IMDBMoviePLOTKEYWORDS(HTML); //AddCustomFieldValueByName('Download_URL','IMDB PLOTKEYWORDS '); If Not(ResultTmp=prFinished) then Result:=ResultTmp; End; LogMessage(' Provider data info retreived Ok in '+DateToStr(CurrentDateTime)+' '+TimeToStr(CurrentDateTime)+'| (~Updated~)'); Mode:=smFinished; LogMessage('Function ParsePage smNormal END======================|'); Exit; End; //Parse with the Person URL 'smFinished'------------------------------------------------------------------------------------ If (Mode=smFinished) Then Begin //Needed because the PHOTO_DWN_RONDABOUT Mode:=smFinished; LogMessage('Function ParsePage smFinished END======================|'); Result:=prFinished; Exit; End; //Parse with unknow mode----------------------------------------------------------------------------------------------- Result:=prError; Exit; End; //BlockClose //OBLIGATORY CALLBACK PRINCIPAL FUNCTION=========================================================================BlockClose { History of changes to the script for downloading movies info from IMDb.com --------------------------------------------- CHANGE LOG : V 1.4.2.8 (22/03/2023) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_1 version V 1.4.2.7 (09/01/2023) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_2 version V 1.4.2.6 (28/06/2022) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_2 version V 1.4.2.5 (28/06/2022) Ivek23: Test new IMDB_[EN] [HTTPS] _Test_1 version V 1.4.2.2 (07/12/2021) Ivek23: Corrected Rumtime parts of the code. See the forum post: http://www.videodb.info/forum_en/index.php/topic,4134.msg21570.html#msg21570 V 1.4.2.1 (28/10/2021) Ivek23: Release new final IMDB_[EN][HTTPS] version Ivek23: Corrected parts of the code with IMDB new layout. See the forum post: http://www.videodb.info/forum_en/index.php/topic,4134.msg21506.html#msg21506 V 1.4.2.0.3 (11/10/2021) Ivek23: Test new IMDB_[EN][HTTPS]_RC3a1 version V 1.4.2.0.2 (06/10/2021) Ivek23: Test new IMDB_[EN][HTTPS]_RC3a version V 1.4.2.0.1 (26/09/2021) Ivek23: Test new IMDB_[EN][HTTPS]_RC3 version V 1.4.2.0 (07/08/2021) Ivek23: Release new final IMDB_[EN][HTTPS] version Ivek23: ParsePage_IMDBMovieBASE = Corrected and fixed to the multiple parts (pieces) of code due to changes source code with IMDB new layout. See the forum post: http://www.videodb.info/forum_en/index.php/topic,4134.msg21434.html#msg21434 V 1.4.1.9.1 (22/07/2021) Ivek23: Test new IMDB_[EN][HTTPS]_RC1 version V 1.4.1.9 (19/07/2021) Ivek23: Test new IMDB_[EN][HTTPS]_RC version V 1.4.1.8 (06/07/2021) Ivek23: Test new IMDB_[EN] [HTTPS] _Test version V 1.4.1.7 (04/07/2021) Ivek23: Test new version V 1.4.1.5 (27/10/2020) Ivek23: ParsePage_IMDBMovieCREDIT (Full Cast and Crew section) = Corrected parts of the code. See the forum post: http://www.videodb.info/forum_en/index.php/topic,4134.msg21196.html#msg21196 V 1.4.1.4 (19/10/2020) Ivek23: ParsePage_IMDBMovieCREDIT (Full Cast and Crew section) = Corrected parts of the code. V 1.4.1.3 (01/05/2020) Ivek23: Added some new custom fields. Made many minor fixes in several pieces of code. See the forum post: http://www.videodb.info/forum_en/index.php/topic,4141.0.html V 1.4.1.2 (10/01/2020) Ivek23: Added "IMDb.com" url links for afrocuban request per forum post: http://www.videodb.info/forum_en/index.php/topic,4154.msg21035.html#msg21035. V 1.4.1.1 (20/06/2019) Ivek23: ParsePage_PLOTKEYWORDS small corrections and fix in the parts of the code 18-19/6/2019 forum alerts. V 1.4.1.0 (10/02/2019) Ivek23: Added ParsePage_PLOTSUMMARY.Ivek23 corrections and improvements since last version (see forum) V 1.4.0.0 (05/01/2019) Ivek23: Added ParsePage_PLOTKEYWORDS.Ivek23 corrections since last version (see forum). V 1.3.1.0 (22/11/2018) Ivek23: ParsePage_IMDBMovieAKA small change in the source code and was missing the name for the country. V 1.3.0.0 (28/10/2018) New parameter USE-SAVED-PVDCONFIG for avoid download page if the Overwrite Options of the Script in the pvdconf.ini are 'Do Nothing'. Remember that PDV only save the pvdconf.ini in exit. V 1.2.0.3 (20/10/2018) Improvement of search stored URL. Better script flow control. Only get FULL_AKA in MediaType='Movie'. More Ivek23 corrections (* V 1.2.0.2 (07/10/2018) Managed IMDB url's not finish in BASE-URL-SUF='/'and principal page download errors. *) V 1.2.0.1 (19/09/2018) Ivek23: Corrected parts of the code 18-19/9/2018 forum alerts. Removed PRESERVE-PVD-DESCRIPTION-SETTING. V 1.2.0.0 (11/09/2018) VVV: PVdBScriptConfig.ini -> Bug corrected "GET-FULL-FEATURES" Ivek23: ParsePage_IMDBMovieCREDIT (Full Cast and Crew section) = Repaired pieces of code for transmitting actors information Ivek23: ParsePage_IMDBSearchTitle = Corrected missing posters in search movies results. Ivek23: ParsePage_IMDBMovieMPAA = Corrected parts of the code. Ivek23: ParsePage = Added compatibility with CustomFields ~IMDbID~, ~Updated~ (last needed because is not possible save in ~moddate~). Ivek23,VVV: ParsePage_IMDBMovieBASE = Corrected to the API evolution. Now get "keywords" in ~tags~ (not in ~category~). Get ~origlang~. Added compatibility with CustomFields ~Bottom 100~, ~Metascore~, ~User Reviews~ New script parameter PRESERVE-PVD-DESCRIPTION-SETTING = Avoid double use of ~description~ and ~comment~ using only the user check fields table selection otherwise try get "Storyline" and "plot_Summary". Ivek23,VVV: ParsePage_IMDBMovieTECHNICAL = Added compatibility with CustomFields ~ImdbTechSpecs~ (original PVD ~features~ can be disabled in the program check fields table) V 1.1.0.0 (08/08/2018) Ivek23,VVV: Movie Technical Specs page retreive in Features field (base page or full). V 1.0.0.2 (06/08/2018) VVV: Set the AddAward( ... Year ...) = EventYear (same in People script) V 1.0.0.1 (01/08/2018) VVV: Change values of CHEAT-PREFIX-URL and DUMMY-HTML-FILE. Little improvements. V 1.0.0.0 (20/05/2018) VVV: Initial public release --------------------------------------------- 5. Cast & Crew field info names: • Directed by • Writing Credits // NO (WGA) • Cast (in credits order) // Only data info in normal Actors field • Produced by • Music by • Cinematography by // NO • Film Editing by // NO • Casting By // NO • Production Design by // NO • Art Direction by // NO • Set Decoration by // NO • Costume Design by // NO • Production Management // NO • Second Unit Director or Assistant Director // NO • Special Effects by // NO • Visual Effects by // NO • Casting Department // NO • Location Management // NO • Music Department // NO • Thanks --------------------------------------------- //SCRIPT_NAME = 'IMDB [EN][HTTPS]'; //The most complete information provider //SCRIPT_DESC = 'IMDB download Movie info [EN]'; //SCRIPT_VERSION = '1.4.2.8'; SCRIPT_NAME = 'IMDB_[EN][HTTPS] (Plot Keywords)'; //The most complete information provider SCRIPT_DESC = 'IMDB download Plot Keywords info [EN]'; SCRIPT_VERSION = '1.4.3.0.'; //SCRIPT_VERSION = '1.3.1.5.'; SCRIPT_TYPE = stMovies; SCRIPT_LANG = $09; //English //$0a es-Spanish $0c fr-French $09 en-English RATING_NAME = 'IMDB'; //PVD has ~imdbrating~ for this value CODE_PAGE = 65001; //28591=ISO 8859-1 Latin 1; Western European (ISO). Use: 65001=Unicode (UTF-8) | 0=for Autodetect Autodetect --------------------------------------------- TYPES AND FUNCTIONS Additional types and functions that can be used in scripts: Types TWIDEARRAY : array of String Field functions procedure AddSearchResult(Title1, Title2, Year, URL, PreviewURL : String) procedure AddFieldValue(AField: Integer; AValue : String) procedure AddMoviePerson(Name, TransName, Role, URL : String; AType : Byte) procedure AddPersonMovie(Title, OrigTitle, Role, Year, URL : String; AType : Byte) procedure AddAward(Event, Award, Category, Recipient, Year: String; const Won : Boolean) procedure AddAwardEx(Event, Award, Category, RecipientVal1, RecipientVal2, Year : String; const Won : Boolean); procedure AddConnection(Title, OrigTitle, Category, URL, Year: String) procedure AddEpisode(Title, OrigTitle, Description, URL, Year, Season, Episode : String) String functions function Pos(Substr : String; Str: String): Integer function PosFrom(const SubStr, Str : String; FromIndex : Integer) : Integer function LastPos(const SubStr, Str : String) : Integer function PrevPos(const SubStr, Str : String; APos : Integer) : Integer function RemoveTags(AText : String; doLineBreaks : Boolean) : String function ExplodeString(AText : String; var Items : TWideArray; Delimiters : String) : Integer function Copy(S: String; Index, Count: Integer): String procedure Delete(var S: String; Index, Count: Integer) procedure Insert(Source: String; var Dest: String; Index: Integer) function Length(S: String): Integer function Trim(S: String): String function CompareText(S1, S2: String): Integer function CompareStr(S1, S2: String): Integer function UpperCase(S: String): String function LowerCase(S: String): String function AnsiString(S, OldPattern, NewPattern: String; All : Boolean; IgnoreCase : Boolean; WholeWord: Boolean): String function StrToInt(const S: String): Integer function IntToStr(const Value: Integer): String function StrToFloat(const S: String): Extended function FloatToStr(const Value: Extended): String function CurrentDateTime : Extended function DateToStr(Value : Extended) : String function TimeToStr(Value : Extended) : String function HTMLValues(const HTML : String; ABegin, AEnd, ItemBegin, ItemEnd : String; ValDelim : String; var Pos : Integer) : String function HTMLValues2(const HTML : String; ABegin, AEnd, ItemBegin, ItemEnd : String; ValDelim : String; var Pos : Integer) : String function TextBetween(const HTML : String; ABegin, AEnd : String; doLineBreaks : Boolean; var Pos : Integer) : String function HTMLToText(const HTML : String) : String procedure ShowMessage(const Msg, Head : String) --------------------------------------------- }