Page 1 of 1

Update OFDb - IMDb (DE)

Posted: 2009-07-04 09:50:03
by gerol
you must update the director-part in OFDb - IMDb (DE)

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;
to

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;
otherwise you can't get the director(s)

Posted: 2009-07-06 09:53:51
by antp
Thanks, I didn't test it, I hope it works :D

Posted: 2009-10-14 16:42:28
by Karlsson
Is it possible to include the german FSK into the comments?

Posted: 2009-11-30 18:30:50
by gerol