(*************************************************** Ant Movie Catalog importation script www.antp.be/software/moviecatalog/ [Infos] Authors=tzvika Title=targumon.com Description=targumon.com import script Site=www.targumon.com Language=HE Version=1.0 Requires=3.5.0 Comments=MovieMeter.nl script by Antoine Potten and IMDB script by Antoine Potten and KaraGarga served as an example for this script License=This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. | GetInfo=1 [Options] ***************************************************) program ADE; uses StringUtils1; const ImportSynopsis = True; {into "Description" field} ImportADEReview = False; {into "Comments" field} ImportCustomerComment = False; {into "Comments" field} ImportBigCover = True; ImportSmallCover = False; ImportRunTime = True; ImportDVDDetails = TRUE; {into "Description" field} {True = imports related data False = NOT import related data} var MovieName: string; function StringReplaceAll(S, Old, New: string): string; begin while Pos(Old, S) > 0 do S := StringReplace(S, Old, New); Result := S; end; procedure CutAfter(var Str: string; Pattern: string); begin Str := Copy(str, Pos(Pattern, Str) + Length(Pattern), Length(Str)); end; procedure CutBefore(var Str: string; Pattern: string); begin Str := Copy(Str, Pos(Pattern, Str), Length(Str)); end; function GetStringFromHTML(Page, StartTag, CutTag, EndTag: string): string; begin Result := ''; if Pos(StartTag, Page) > 0 then begin CutBefore(Page, StartTag); if Length(CutTag) > 0 then CutAfter(Page, CutTag); Result := Copy(Page, 0, Pos(EndTag, Page) - 1); HTMLDecode(Result); end; end; procedure AnalyzePage(Address: string); var Page: TStringList; LineNr: Integer; Line, Value: String; BeginPos, EndPos: Integer; begin Page := TStringList.Create; Page.Text := GetPage(Address); if pos('חיפושים נכשלים',Page.Text) =0 then begin if pos('מתוך', Page.Text) = 0 then begin //SetField(fieldURL, Address); AnalyzeMoviePage(Page) end else begin PickTreeClear; LineNr := 0; if FindLine('מתוך',Page,0)>-1 then begin PickTreeAdd('Targumon Title Search:', ''); repeat // loop for processing all result pages repeat // loop for processing all results in a given page LineNr := FindLine('table border="0">