booker wrote:It would be nice if there was a feature to run this import script for each entry to great the information from imdb etc.
![confused :??:](./images/smilies/confused.gif)
booker wrote:It would be nice if there was a feature to run this import script for each entry to great the information from imdb etc.
Just go on the "Editor" tab of the script window, then at the bottom of the script you find something like :
sometimes there is also an old line that begins with "//" (you can delete this line)Code: Select all
if Input('IMDb Import', 'Enter the title of the movie:', MovieName) then begin AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName)); end;
Just replace this block by a simple call to AnalyzePage :
(remove the "if ... then", "begin" and the "end" line)Code: Select all
AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
If you prefer to keep the Window asking you if the title is empty, you can do this :
Code: Select all
if MovieName <> '' then AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName)) else if Input('IMDb Import', 'Enter the title of the movie:', MovieName) then AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
Code: Select all
if (LineNr > -1 ) then
begin
LineNr := FindLine('src="http://images.amazon.com/images/P/',AmazonPage, LineNr);
if not PickTreeSelected then
TitleLine:= FindLine('/exec/obidos/ASIN/',AmazonPage, 0);
if (LineNr > TitleLine) then
LineNr:=-1
if LineNr > -1 then
begin
Line := AmazonPage.GetString(LineNr);
BeginPos := Pos('src="http://images.amazon.com/images/P/', Line) + 4;
Delete(Line, 1, BeginPos);
EndPos := Pos('"', Line);
Value := Copy(Line, 1, EndPos - 1);
Value := StringReplace(Value, 'TZZZZZZZ', 'LZZZZZZZ');
Value := StringReplace(Value, 'THUMBZZZ', 'LZZZZZZZ');
GetPicture(Value, ExternalPictures);
FoundOnAmazon := True;
end;
end;
Code: Select all
if (LineNr > -1 ) then
begin
LineNr := FindLine('src="http://images.amazon.com/images/P/',AmazonPage, LineNr);
if not PickTreeSelected then
TitleLine:= FindLine('/exec/obidos/ASIN/',AmazonPage, 0);
if (LineNr > TitleLine) then
LineNr:=-1[b];[/b]
if LineNr > -1 then
begin
Line := AmazonPage.GetString(LineNr);
BeginPos := Pos('src="http://images.amazon.com/images/P/', Line) + 4;
Delete(Line, 1, BeginPos);
EndPos := Pos('"', Line);
Value := Copy(Line, 1, EndPos - 1);
Value := StringReplace(Value, 'TZZZZZZZ', 'LZZZZZZZ');
Value := StringReplace(Value, 'THUMBZZZ', 'LZZZZZZZ');
GetPicture(Value, ExternalPictures);
FoundOnAmazon := True;
end;
end;