update OFDb - IMDb (DE)

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
gerol
Posts: 37
Joined: 2006-08-08 16:12:03

update OFDb - IMDb (DE)

Post by gerol »

Hi,

you must change the part

Code: Select all

 // Director
  LineNr := FindLine('Directed by', 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(fieldDirector, FullValue);
  end;
to:

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;
    HTMLDecode(FullValue);
    SetField(fieldDirector, FullValue);
  end;
otherwise the director isn't found anymore
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Indeed, same change had to be done in the IMDB-only script...
Thanks.
Post Reply