English > Scripts and Templates
People imdb script: additional information
Ivek23:
Or, in your script do this
--- Code: ---procedure ParseBiography(BiographyURL : String; HTML : String);
var
curPos, endPos: Integer;
Name, URL, TmpStr, TmpStr1, TmpStr2, TmpStr3, TmpStr4 : String;
begin
fullinfo2 := fullinfo1+fullinfo2;
fullinfo2 := fullinfo2;
//Get ~Biography URL~
endPos := Pos('"og:url" content="', HTML);
if endPos > 0 then begin
curPos := PrevPos('<link rel="canonical" href="', HTML, endPos);
ExtraLinks[smBiography] := Copy(HTML, curPos+28, endPos - curPos-47);
fullinfo2 := fullinfo2 + '<link url="' + ExtraLinks[smBiography] + '">Biography Page</link>'+ #13 ;
LogMessage(fullinfo2);
end;
(*
//~Poster~
curPos := PosFrom('><img border="0" src="', HTML, endPos);
if curPos > 0 then begin
curPos := curPos + Length('><img border="0" src="');
endPos := PosFrom('" ', HTML, curPos);
ExtraLinks[smPoster] := Copy(HTML, curPos, EndPos - curPos);
end;
*)
// Biography Page
--- End code ---
and this
--- Code: ---procedure ParseGenreindex(GenreindexURL : String; HTML : String);
var
curPos, endPos: Integer;
Name, URL, TmpStr, TmpStr1, TmpStr2, TmpStr3, TmpStr4 : String;
begin
//Get ~Genre index URL~
endPos := Pos('"og:url" content="', HTML);
if endPos > 0 then begin
curPos := PrevPos('<link rel="canonical" href="', HTML, endPos);
ExtraLinks[smGenreindex] := Copy(HTML, curPos+28, endPos - curPos-47);
end;
(*
//~Poster~
curPos := PosFrom('><img border="0" src="', HTML, endPos);
if curPos > 0 then begin
curPos := curPos + Length('><img border="0" src="');
endPos := PosFrom('" ', HTML, curPos);
ExtraLinks[smPoster] := Copy(HTML, curPos, EndPos - curPos);
end;
*)
//~Genre index~
--- End code ---
well, and the same will result.
Here is the updated code for ParseSearchResult
--- Code: ---procedure ParseSearchResults(HTML : String);
var
curPos, endPos : Integer;
Name, Name1, URL, Preview : String;
begin
curPos := Pos('<div id="content-2-wide">', HTML);
if curPos < 1 then
Exit;
LogMessage('Parsing search results...');
curPos := PosFrom('"><img src="', HTML, curPos)+12;
endPos := PosFrom('.jpg" width="23" height="32" border="0">', HTML, curPos);
Preview := Trim(Copy(HTML, curPos, endPos - curPos));
curPos := PosFrom('<a href="/name/', HTML, curPos);
while curPos > 0 do begin
endPos := PosFrom('" onclick="(new Image()).src=', HTML, curPos);
URL := Trim(Copy(HTML, curPos+9, endPos - curPos-9));
URL := BASE_URL + URL;
curPos := PosFrom('">', HTML, curPos)+2;
endPos := PosFrom('</small>', HTML, curPos);
Name := RemoveTags(Trim(Copy(HTML, curPos, endPos - curPos)), false);
curPos := PosFrom('"><img src="', HTML, curPos)+12;
endPos := PosFrom('.jpg" width="23" height="32" border="0">', HTML, curPos);
Preview := Trim(Copy(HTML, curPos, endPos - curPos));
AddSearchResult(Name, '', '', URL, '');
curPos := PosFrom('<a href="/name/', HTML, curPos);
end;
end;
--- End code ---
woland68:
:) Now work well
Thank you
Grazie
??? ??? ???
Is there a script for people to import photos?
example Google or Bing
Ivek23:
--- Quote from: woland68 on April 08, 2012, 03:45:13 pm ---Is there a script for people to import photos?
example Google or Bing
--- End quote ---
For Google or Bing the answer is no, except for the manual transfer of files from web pages. Yes, there are ImdbImage to transfer photos from Imdb.
ImdbImage attached.
[attachment deleted by admin]
woland68:
???
I tried, it only matters a photo, the others are outside the database
I do not understand how many pictures are exported to a person
have screens to explain the procedure?
Ivek23:
--- Quote from: woland68 on April 08, 2012, 06:30:43 pm --- ???
I tried, it only matters a photo, the others are outside the database
I do not understand how many pictures are exported to a person
have screens to explain the procedure?
--- End quote ---
Since PVD for people does not support photos on same way as it supports the posters for movies is required each time especially any photo of people save in this folder (for example, in folder PVD People Photo) on computer or disk, before being transferred to the next photo people. Once you have all the photos of people you like, be any photo of people especially in the photo box people which photos you already have stored in a folder.
An example of a person: John Wayne
Pictures attached.
[attachment deleted by admin]
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version