During the testing i find out how to download all poster-image.
Code:
if DOWNLOAD_POSTER_ROLE then begin
curPos := Pos('<h4><span>main character</span></h4>', HTML);
LogMessage('10 IF POSTER_ROLE');
if curPos > 0 then begin
TmpURLpr := '';
curPos := PosFrom('<img src="
http://img7.anidb.net/pics/anime/thumbs/', HTML, curPos);
EndPos := curPos;
curPos1 := PosFrom('<h4><span>secondary cast</span></h4>', HTML, curPos)
LogMessage('21.1 ROLE POSTER Actors jpg');
//while (curPos < curPos1) and (curPos > EndPos) do begin
while (curPos < curPos1) do begin
curPos := PosFrom('<img src="
http://img7.anidb.net/pics/anime/thumbs/', HTML, curPos) + Length('<img src="
http://img7.anidb.net/pics/anime/thumbs/50x65/'); EndPos := PosFrom('-thumb.jpg"', HTML, curPos);
LogMessage('10.1 DOWNLOAD_POSTER_ROLE');
URLpr := '
http://img7.anidb.net/pics/anime/' + Copy(HTML, curPos, EndPos - curPos);
LogMessage('10.2 URL ROLE ACTORS: '+URLpr);
LogMessage('10.3 List of URL ROLE ACTORS to download: '+TmpURLpr);
TmpURLpr := TmpURLpr + URLpr+';'+#32 ;
ExtraLinks[smPoster] := URLpr //AddImageURL(0,URLpr); end;
//ExtraLinks[smPoster] := TmpURLpr **not working error bad request
end;
I would like to ask if someone know how to download poster-image:
1. save in the place where is file with movie or some other place not in to the database file. (which setting can i use?)
2. save poster-image with specific name (for example name of role from movie) which is different when i download from url.
Thanks for any advice.