Or, in your script do this
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
and this
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~
well, and the same will result.
Here is the updated code for ParseSearchResult
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;