(*************************************************** Ant Movie Catalog importation script www.antp.be/software/moviecatalog/ [Infos] Authors=mOrfiUs (mOrfiUs@hotmail.es) Title=Serakon (ES).ifs Description=Movie importation script for Serakon Site=http://www.serakon.com Language=ES Version=1.00 Requires=3.5.0 Comments=para auténticos cinéxfilos License=The source code of the script can be used in another program only if full credits to script author and a link to Ant Movie Catalog website are given in the About box or in the documentation of the program.| GetInfo=1 [Options] DontAsk=1|0|1=Desatendido: sin confirmación cuando sólo hay un resultado|0=Manual: Confirmas la información manualmente ***************************************************) program Serakon; var MovieName: string; MovieURL: string; //------------------------------------------------------------------------------------ function FindLine(Pattern: string; List: TStringList; StartAt: Integer): Integer; var i: Integer; begin Result := -1; if StartAt < 0 then StartAt := 0; for i := StartAt to List.Count-1 do if Pos(Pattern, List.GetString(i)) <> 0 then begin Result := i; Break; end; end; //------------------------------------------------------------------------------------ function TextBetween(var S: string; StartTag: string; EndTag: string): string; var InitialPos: Integer; begin InitialPos := Pos(StartTag, S); if InitialPos = 0 then result := '' else begin Delete(S, 1, InitialPos + Length(StartTag) - 1); InitialPos := Pos(EndTag, S); if InitialPos = 0 then result := S else begin result := Copy(S, 1, InitialPos - 1); Delete(S, 1, InitialPos + 1); end; end; end; //------------------------------------------------------------------------------------ procedure AnalyzePage(Address: string); var Page: TStringList; LineNr: Integer; Line,Line2: string; Count: Integer; PageSearch: Integer; MovieTitle, MovieAddress: string; begin Count := 0; PageSearch := 1; Page := TStringList.Create; Page.Text := GetPage(Address); PickTreeClear; // Veamos si solo hay un solo resultado LineNr := FindLine('1 artículos: ', Page, 0); if LineNr <> -1 then begin LineNr := FindLine('