(*************************************************** Ant Movie Catalog importation script www.antp.be/software/moviecatalog/ [Infos] Authors=Håkan M Title=Discshop Description=Import data & picture from www.discshop.se in swedish Site=www.discshop.se Language=SE Version=1.2.0 Requires=3.5.0 Comments=Based on the Discshop-script (v.1.1.0) made by Andreas Fridvall|Updated & modified by Håkan M 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] BatchMode=0|0|0=Normal working mode, prompts user when needed (default)|1=Does not display any window, takes the first movie found MultipleValuesActors=3|3|0=Only take first value for Actors|1=Take full list, separated by commas|2=Take full list, separated by slashes (default)|3=Take full list, separated by linebreaks MultipleValuesCountry=1|1|0=Only take first value for Country|1=Take full list, separated by commas (default)|2=Take full list, separated by slashes MultipleValuesCategory=1|1|0=Only take first value for Category|1=Take full list, separated by commas (default)|2=Take full list, separated by slashes MultipleValuesLanguages=1|1|0=Only take first value for Languages|1=Take full list, separated by commas (default)|2=Take full list, separated by slashes FilmOrMusic=0|0|0=Search for movies (default)|1=Search for music-dvd ***************************************************) program Discshop; uses StringUtils1; var MovieList: string; MovieName: string; MovieURL: string; MovieNumber: string; SearchID: string; SubSite: string; StartPos: integer; MovieListLength: integer; ListEmpty: integer; // ***** analyzes the results page that asks to select a movie from a list ***** procedure AnalyzeResultsPage(Address: string); var PageText: string; Value: string; begin PageText := GetPage(Address); if GetOption('BatchMode') = 0 then begin // No movies were found if Pos('Listar alla 0 produkter...', PageText) <> 0 then begin ShowMessage('No movie found for this search'); Exit; end; // Only one movie was found if Pos('Listar alla 1 produkter...', PageText) <> 0 then begin MovieNumber := TextBetween(PageText, 'ds.php?red=ds_produkt.php&&arg=id@@@', ',,,'); MovieURL := 'http://www.discshop.se/shop/ds_produkt.php?subsite=' + SubSite +'&id=' + MovieNumber; PageText := GetPage(MovieURL); AnalyzeMoviePage(PageText); Exit; end; // More that one movie was found PickTreeClear; ListEmpty := 1; MovieList := TextBetween(PageText, '