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 »

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)
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Thanks, I didn't test it, I hope it works :D
Karlsson
Posts: 1
Joined: 2009-10-14 16:40:40

Post by Karlsson »

Is it possible to include the german FSK into the comments?
gerol
Posts: 37
Joined: 2006-08-08 16:12:03

Post by gerol »

Post Reply