Update OFDb - IMDb (DE)
Posted: 2009-07-04 09:50:03
you must update the director-part in OFDb - IMDb (DE)
from
to
otherwise you can't get the director(s)
from
Code: Select all
// Director
LineNr := FindLine('Director', 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;
FullValue := UTF8Decode(FullValue);
HTMLDecode(FullValue);
SetField(fieldDirector, FullValue);
end;
Code: Select all
// Director
LineNr := FindLine('director-info', Page, 0);
if LineNr > -1 then
begin
LineNr := LineNr + 2;
FullValue := '';
repeat
LineNr := LineNr + 4;
Line := Page.GetString(LineNr);
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;
until Value = '';
FullValue := UTF8Decode(FullValue);
HTMLDecode(FullValue);
SetField(fieldDirector, FullValue);
end;