Page 1 of 1
script for http://www.dvdlister.com/
Posted: 2003-05-15 07:06:33
by elman
hi
just found great source for large cover images. Could anybody please make a script fot it?
thanks
http://www.dvdlister.com/[/url]
Posted: 2003-08-17 22:19:55
by FireStarter
Does anybody wants / can make a script for this. It's really a great source for large pics.
Posted: 2003-08-19 07:51:53
by Dmitry501
Code: Select all
// GETINFO SCRIPTING
// Imports large picture from dvdlister
// Dmitry501
program DVDLister_com;
const
BaseAddress = 'http://www.dvdlister.com/';
var
MovieName: 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;
procedure AddMoviesTitles(Page: TStringList; var LineNr: Integer);
var
Line, Line1: string;
MovieTitle, MovieAddress: string;
BeginPos,EndPos,AddPos: Integer;
begin
Line := Page.GetString(LineNr);
EndPos := pos('Popular titles', Line);
Delete(Line,EndPos,Length(Line));
repeat
BeginPos := pos('<span class="title">', Line);
If BeginPos > 0 then
begin
EndPos := pos('</span>', Line);
MovieTitle:=copy(Line,BeginPos,EndPos - BeginPos);
Line1 := MovieTitle;
HTMLRemoveTags(MovieTitle);
BeginPos := pos ('HREF="',Line1);
AddPos := pos('/">', Line1);
MovieAddress:=copy(Line1,BeginPos+6,AddPos - BeginPos - 5);
PickTreeAdd(MovieTitle, MovieAddress);
Delete(Line,1,EndPos);
end;
until BeginPos <= 0;
end;
procedure AnalyzePage(Address: string);
var
Page: TStringList;
LineNr : Integer;
Params : String;
begin
Page := TStringList.Create;
Page.Text := GetPage(Address);
PickTreeClear;
LineNr := 0;
LineNr := FindLine('results for title containing', Page, LineNr);
if LineNr > -1 then
begin
PickTreeAdd('Search: '+MovieName,'');
AddMoviesTitles(Page, LineNr);
end;
if PickTreeExec(Address) then
begin
AnalyzeMoviePage(Address);
end
end;
procedure AnalyzeMoviePage(Address: String);
var
Page: TStringList;
LineNr : Integer;
Line, Value : String;
BeginPos, EndPos : Integer;
begin
Page := TStringList.Create;
Page.Text := GetPage(Address);
// Picture
LineNr := FindLine('View front cover', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
BeginPos := pos('href="', Line);
EndPos := pos('">View front cover', Line);
Value := copy(Line, BeginPos+6, EndPos - BeginPos-6);
Address := Value;
Page.Text := GetPage(Address);
LineNr := FindLine('Front cover DVD', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
BeginPos := pos('src="', Line);
EndPos := pos('" alt="Front cover DVD"', Line);
Value := copy(Line, BeginPos+5, EndPos - BeginPos-5);
GetPicture(Value, True); // NOT WORKING!!! GETPICTURE filesize=0!
end;
end;
DisplayResults;
end;
begin
if CheckVersion(3,4,0) then
begin
MovieName := GetField(fieldOriginalTitle);
if MovieName = '' then
MovieName := GetField(fieldTranslatedTitle);
if Input('Import picture from www.dvdlister.com', 'Enter the title of the movie:', MovieName) then
begin
AnalyzePage('http://www.dvdlister.com/search.dvd?type=T&searchvalue='+UrlEncode(MovieName));
end;
end else
ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.4.0)');
end.
I can't import picture. Internet explorer get picture, no AMC. What?
Posted: 2003-08-19 14:55:00
by antp
Maybe that the server checks the referrer... when I try to view the picture in Mozilla it works ok in the page, but not if I ask the picture alone :heink:
Posted: 2003-08-20 01:38:39
by Dmitry501
Ok.
Maybe that the server checks the referrer...
Maybe...
I try use proxomitron for analize this pages...
Posted: 2003-08-26 16:48:49
by Guest
Really a great site. Somebody please make a script for this
Posted: 2003-08-27 02:13:10
by Dmitry501
Maybe that the server checks the referrer...
Yes! Server check referrer, but AMC no send referrer
. Wait in new version of AMC
antp, please, append this feature to GETPAGE and GETPICTURE.
Posted: 2003-08-27 07:34:24
by antp
Sure, I'll have to add that
Posted: 2003-08-28 02:20:49
by Dmitry501
Good stuff that! We are in for a pleasant surprise. When can you fix?
Posted: 2003-08-28 09:14:29
by antp
I'll never "fix" it in AMC3
you'll have to wait for AMC4, and I am not sure that I will put it in 4.0, but probably later