English > Talk
Alternative
VVV_Easy_Programing:
The Alfa 7 version:
http://vvveasy.altervista.org/wp-content/uploads/2018/05/PersonalVideoDB_MOD-V.Alfa_.7.zip
Corrected the important error of no waiting to finish of download (see down).
Remember run with "portable.bat" (that is with the debug mode set in this test version).
We entry in the script debug so: If you have problems, please is very important the name of the movie and attach the file: PersonalVideoDB\log.txt
Now we are capable of change the script parameters, so I recomend see first the new Script "**** Scripts Configuration ****" (doesn't affect to database)
----------------------------------------------------------------------------------------------------------------
Important: This is a alfa version (even it not arrives beta level). Please is only for test, not mix your personal Database with this version. You may unzip in your desktop and run only in portable mode (portable.bat) without internet proxi.
----------------------------------------------------------------------------------------------------------------
Now the IMDB and the FA pages are very big. curl download writing directly over the file so now "PVdBDownPage.exe" wait to have all the page to pass to the script. In the precedent versions, with Win_7 OS is normal that you get a lot of strange problems. I have done several test and it works with my speed of line and computer. Now the INTERNET_TEST_ITERATIONS = 5 (so 10seg). If you get some alerts of no internet conexión you may increase.
--- Quote ---(31.5.2018 19:22:12) Now present file: D:\MyTestPVD\PersonalVideoDB_MOD\PersonalVideoDB6\Scripts\downpage-UTF8_NO_BOM.htm
(31.5.2018 19:22:18) Compiling script: IMDB_[EN][HTTPS].psf
--- End quote ---
Ivek23: I supose that in this moment you have got the crash "StackOverflow" window: It's not possible that PVD needs to compilate in the middle of runnig of script. In this moment we get a erratic working.
Ivek23:
The Alfa 7 version:
IMDB_ [EN] [HTTPS] script
Change the part of the code for posters I found today and have already repaired.
Before:
--- Code: ---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://ia.media-imdb.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
--- End code ---
After:
--- Code: --- 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/';
//BASE_URL_IMAGE_PRE_TRUE = 'https://ia.media-imdb.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
--- End code ---
For now, the scriprt works ok. We will see what will be after several tests.
Ivek23:
IMDB_ [EN] [HTTPS] script
In IMDB_ [EN] [HTTPS] script is an error in downloading Full AKA info as well as Original Title for Buffalo Bill, l'eroe del far west movie. This error has been from the beginning of IMDB_ [EN] [HTTPS] script.
Ivek23:
IMDB_ [EN] [HTTPS] script
Alexander Hamilton movie
Alexander Jamieson movie
I've corrected a part of the code in Function ParsePage_IMDBMovieAKA.
--- Quote ---Function ParsePage_IMDBMovieAKA(HTML:String):Cardinal; //BlockOpen
//Returns:
// Result:=prFinished; Script has finished gathering data
// Result:=prError; If not results
//Retrieve: ~aka~ "Also Known As"
Var
debug_pos1 : Integer;
curPos,endPos,index:Integer;
ItemValue,ItemList:String;
ItemArray: TWideArray;
Begin
LogMessage('Function ParsePage_IMDBMovieAKA BEGIN=====================||');
//Get ~aka~ (several values in a line break separated list) Be careful don't repeat
//Go to "Also Known As"
curPos:=Pos('<h4 class="li_group">Also Known As (AKA)',HTML); //Strings start which opens the block content data. WEB_SPECIFIC
curPos:=PosFrom('</h4>',HTML,curPos); //Strings end which opens the block content data. WEB_SPECIFIC
curPos:=curPos+Length('</h4>'); //Strings end which opens the block content data. WEB_SPECIFIC
//Get all "raw" list aka for create good values separators
endPos:=PosFrom('</table>',HTML,curPos); //Strings which opens/closes the data. WEB_SPECIFIC
ItemList:=Copy(HTML,curPos,endPos-curPos);
ItemList:=StringReplace(ItemList,'</td>',';',True,True,False); //WEB_SPECIFIC
//Get all aka list (NOT necesary in raw because: Several couple of valors (Country/title) but the first is the original title
ItemList:=RemoveTags(ItemList, False);
//LogMessage(' Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');List+'||');
ExplodeString(ItemList,ItemArray,';');
ItemValue:='';
For index:=(Low(ItemArray)+1) To (High(ItemArray)/2) Do Begin //Remember index begin in 0
If index=1 Then Begin // The first is the original title. WEB_SPECIFIC
AddFieldValueXML('origtitle',ItemArray[(index*2-1)]);
LogMessage(' Get result origtitle:'+ItemArray[(index*2-1)]+'||');
End Else Begin
//Verify if we get before the same title
If Pos(ItemArray[(index*2-1)],ItemValue)=0 Then ItemValue:=ItemValue+'<br>'+ItemArray[(index*2-1)];
End;
End;
debug_pos1:=Pos('}})',ItemValue);
if debug_pos1 >0 then ItemValue := Copy(ItemValue,0,debug_pos1-1);
AddFieldValueXML('aka',ItemValue);
LogMessage(' Get results aka:'+ItemValue+'||');
Result:=prFinished;
LogMessage('Function ParsePage_IMDBMovieAKA END=====================||');
End; //BlockClose
--- End quote ---
An error occurs when a record is on the web page.
--- Quote ---Also Known As (AKA)
It looks like we don't have any AKAs for this title yet.
Be the first to contribute! Just click the "Edit page" button at the bottom of the page or learn more in the AKAs submission guide.
--- End quote ---
VVV_Easy_Programing:
The Alfa 8 version ONLY SCRIPT FOLDER:
http://vvveasy.altervista.org/wp-content/uploads/2018/06/Scripts-V.Alfa_.8.zip
Corrected the BASE_URL_IMAGE_PRE_TRUE and the AKA errors and others (see down). Added the people script "IMDB_People_[EN][HTTPS]" (the last)
Change the ancient folder for the new folder. Remember run with "portable.bat" (that is with the debug mode set in this test version).
We entry in the script debug so: If you have problems, please is very important the name of the movie and attach the file: PersonalVideoDB\log.txt
Now we are capable of change the script parameters, so I recomend see first the new Script "**** Scripts Configuration ****" (doesn't affect to database)
----------------------------------------------------------------------------------------------------------------
Important: This is a alfa version (even it not arrives beta level). Please is only for test, not mix your personal Database with this version. You may unzip in your desktop and run only in portable mode (portable.bat) without internet proxi.
----------------------------------------------------------------------------------------------------------------
I prefer correct the AKA no results with a comprobation in the beginnig of the subrutine:
--- Quote --- Result:=prFinished;
if (Pos('It looks like we don'+Chr(39)+'t have any AKAs for this title yet.',HTML)>0) then Exit;
--- End quote ---
I think that the problema of "Buffalo Bill, l'eroe del far west" is the comma because it get the countries. It's NOT corrected but I have some ideas. Stay tunned.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version