Posted: 2006-01-28 19:35:40
No. It's your turn
Code: Select all
StartPos := pos('<a href=''view.php?page=film&fid=', Line);
if StartPos > 0 then
begin
Delete(Line, 1, StartPos + 8);
MovieAddress := copy(Line, 1, pos('''>', Line) - 1);
StartPos := pos('''>', Line) +2;
Code: Select all
StartPos := pos('<a href="view.php?page=film&fid=', Line);
if StartPos > 0 then
begin
Delete(Line, 1, StartPos + 8);
MovieAddress := copy(Line, 1, pos('">', Line) - 1);
StartPos := pos('">', Line) +2;
Code: Select all
function AddMoviesTitles(Page: TStringList; var LineNr: Integer) : string;
var
Line: string;
MovieTitle, MovieAddress: string;
StartPos, EndPos, NumTitles,MK: Integer;
begin
result := '';
Line := Page.GetString(LineNr);
NumTitles := 0;
repeat
StartPos := pos('<a href="view.php?page=film&fid=', Line);
if startPos = 0 then
begin
StartPos := pos('<a href=''view.php?page=film&fid=', Line);
MK := 1;
end;
if StartPos > 0 then
begin
Delete(Line, 1, StartPos + 8);
if MK = 0 then MovieAddress := copy(Line, 1, pos('">', Line) - 1)
else MovieAddress := copy(Line, 1, pos('''>', Line) - 1);
if MK = 0 then StartPos := pos('">', Line) +2
else StartPos := pos('''>', Line) +2;
MovieTitle := copy(Line, StartPos, pos('</a>', Line) - StartPos);
HTMLRemoveTags(MovieTitle);
NumTitles := NumTitles + 1;
PickTreeAdd(MovieTitle , 'http://www.ofdb.de/' + MovieAddress);
end;
until (StartPos < 1);
if NumTitles = 1 then result := 'http://www.ofdb.de/' + MovieAddress;
end;