OFDb

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
Dirk999
Posts: 2
Joined: 2013-06-28 08:47:33

OFDb

Post by Dirk999 »

Is there any chance for fixing OFDb.ifs? I would be greatefull.

The script shows in Kategorie

<span itemprop="genre">Komödie</span>


Thanks

Dirk
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

That's easy to fix.

Just before the line
SetField(fieldCategory, Value);
add a line with
HtmlRemoveTags(Value);

I'll also update the script on the server.
Raoul_Volfoni
Posts: 863
Joined: 2006-08-31 23:58:18

Post by Raoul_Volfoni »

Arff ... too slow ;)

I noticed the Rating part needed to be corrected too.

Code: Select all

  // Rating
  LineNr := Findline('Note: <span itemprop="ratingValue">', Page, 0);
  if LineNr > -1 then
  begin
    Line:= Page.GetString(LineNr);
    BeginPos := Pos('Note: <span itemprop="ratingValue">',Line) + 35;

    // I had to add 0.1 here to make the rounding more precise
    Value := IntToStr(Round((StrToInt(Copy(Line, BeginPos+2, 2), 0) + 0.1) / 10));
    if StrToInt(Value,0) > 9 then
      Value := IntToStr(StrToInt(StrGet(Line, BeginPos),0) + 1) + '.0'
    else
      Value := StrGet(Line, BeginPos) + '.' + Value;
    SetField(fieldRating, Value);
  end;
Tschüss
antp
Site Admin
Posts: 9639
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

thanks ;)
Dirk999
Posts: 2
Joined: 2013-06-28 08:47:33

Post by Dirk999 »

you 2 makes me happy, unfortunately i'm not a script-kiddie ;-)

Thanks , thanks, thanks

dirk
gnuffmaster
Posts: 8
Joined: 2008-06-21 15:19:09

Post by gnuffmaster »

Look here for the updated version:

viewtopic.php?t=5672&highlight=ofdb
Post Reply