IMDB full genre
IMDB full genre
can some1 help how to write in script to take full genre from imdb site not only first one?? plzz
edit/change your imdb script with following
//Category
LineNr := FindLine('Genre:', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr + 1);
BeginPos := pos('/">', Line) + 3;
EndPos := pos('</a>', Line);
Value := copy(Line, BeginPos, EndPos - BeginPos);
HTMLDecode(Value);
SetField(fieldCategory, Value);
// Multiple categories
Value := '';
BeginPos := pos('Sections/Genres/', Line);
while BeginPos > 0 do
begin
Line := copy(Line, BeginPos+16, Length(Line)-BeginPos-17);
EndPos := pos('/">', Line);
Value := Value + ' / ' + copy(Line, 1, EndPos-1);
BeginPos := pos('Sections/Genres/', Line);
end;
Value := copy(Value,4,Length(Value)-1);
HTMLDecode(Value);
SetField(fieldCategory, Value);
end;
//Category
LineNr := FindLine('Genre:', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr + 1);
BeginPos := pos('/">', Line) + 3;
EndPos := pos('</a>', Line);
Value := copy(Line, BeginPos, EndPos - BeginPos);
HTMLDecode(Value);
SetField(fieldCategory, Value);
// Multiple categories
Value := '';
BeginPos := pos('Sections/Genres/', Line);
while BeginPos > 0 do
begin
Line := copy(Line, BeginPos+16, Length(Line)-BeginPos-17);
EndPos := pos('/">', Line);
Value := Value + ' / ' + copy(Line, 1, EndPos-1);
BeginPos := pos('Sections/Genres/', Line);
end;
Value := copy(Value,4,Length(Value)-1);
HTMLDecode(Value);
SetField(fieldCategory, Value);
end;
IMDB script doesn't work.
I too am trying to get IMDB to retrieve the correct movie info but it's not working...I tried the suggestion as per Guest and it still just retrieves the first one it finds.
The movie I'm trying this on is Day of the Jackal, 1973 but it always pulls up the 1997 one with Bruce Willis. I've tried the other scripts but they don't import the small picture which is what I really want. It used to prompt me with a list of several choices but I guess IMDB changed and the script doesn't work well anymore.
Can someone maybe just post a full working script for IMDB or any other that works as mentioned above and has as many movies available as IMDB or more?
Thanks.
The movie I'm trying this on is Day of the Jackal, 1973 but it always pulls up the 1997 one with Bruce Willis. I've tried the other scripts but they don't import the small picture which is what I really want. It used to prompt me with a list of several choices but I guess IMDB changed and the script doesn't work well anymore.
Can someone maybe just post a full working script for IMDB or any other that works as mentioned above and has as many movies available as IMDB or more?
Thanks.
For me, this is working:
//Category
LineNr := FindLine('Genre:', Page, 0);
if LineNr > -1 then
begin
FullValue := '';
Line := Page.GetString(LineNr + 1);
repeat
BeginPos := pos('">', Line) + 2;
EndPos := pos('</a>', Line);
Value := copy(Line, BeginPos, EndPos - BeginPos);
if (Value <> '(more)') and (Value <> '') then
begin
if FullValue <> '' then
FullValue := FullValue + ' / ';
FullValue := FullValue + Value;
end;
Delete(Line, 1, EndPos);
until Pos('</a>', Line) = 0;
HTMLDecode(FullValue);
SetField(fieldCategory, FullValue);
end;
And similar for Country and Language
//Category
LineNr := FindLine('Genre:', Page, 0);
if LineNr > -1 then
begin
FullValue := '';
Line := Page.GetString(LineNr + 1);
repeat
BeginPos := pos('">', Line) + 2;
EndPos := pos('</a>', Line);
Value := copy(Line, BeginPos, EndPos - BeginPos);
if (Value <> '(more)') and (Value <> '') then
begin
if FullValue <> '' then
FullValue := FullValue + ' / ';
FullValue := FullValue + Value;
end;
Delete(Line, 1, EndPos);
until Pos('</a>', Line) = 0;
HTMLDecode(FullValue);
SetField(fieldCategory, FullValue);
end;
And similar for Country and Language