Page 1 of 1

[REQ] ofdb.de FIX! 2 fields doesnt work anymore!

Posted: 2006-12-21 07:41:11
by Legion
Hi there,

the ofdb.de-Script has 2 little errors, it works fine at all, instead of the "actors" and "regie" field. They stay empty, even there is a input for it.

I tried to fix it by myself, but i am yet not skilled enough to do this. At all I think, it is just a little error to fix. So it would be nice, if someone has some minutes to do this.

Here you can donwload the ofdb.de script: http://www.antp.be/temp/scripts/

Thank you very much for any help!!

Greetings,
Legion

Posted: 2006-12-22 02:20:19
by bad4u
Fixed.

You can download the fixed script here: [download link deleted, look following postings]
(this is a temporary address only for some days - hit 'GMX MediaCenter starten', choose ofdb(DE).ifs - Datei - download)


*** Would be nice to upload this script to antp website :) ***


Some more Information:

The missing data for director & actors is caused by the variable 'BeginPos' always set to '0', as ofdb.de changed the links for director and actors inside the html code from

<a href="view.php?page=liste&Name=Director">

to

<a href='view.php?page=liste&Name=Director%F3'>

When the script imports this line the control list for variables shows a different result :

<a href="view.php?page=liste&Name=Director%F3">

Problem: The script cannot find the position of the " in this line. This error seems to be caused by the ' symbol in the website's html code - a symbol that movie catalog cannot import, because it uses the ' ' symbols to limit strings within the variables (and one ' between two ' ' doesn't work).

Sorry, complicated to explain .. I shouldn't try to ;)

Posted: 2006-12-22 02:40:59
by bad4u
Fixed the 'Country' field, too.

It imported only one country instead of all (recognized it when testing 'Bandidas')

Posted: 2006-12-22 07:58:48
by Legion
Many, many Thanks for fixing it, bad4u ;)

And also thanks for that good and detailed Info, how you fixed it. Now i got it ;)

Greetings & have a nice Xmas
Legion

Posted: 2006-12-22 16:03:22
by antp
bad4u wrote:
*** Would be nice to upload this script to antp website :) ***
Thanks ;)
I added it to www.antp.be/temp/scripts/

Posted: 2006-12-28 11:36:06
by Kikaba
sensationell
merci

Posted: 2007-02-05 13:24:42
by Legion
Houston, we have a problem (again) ;)

Well, Actors field doesn't work anymore. It only fills just a few actors in the field, then it shows " [mehr] " and thats it. Here you can see the error:

Image

Would be really nice, if someone could fix it!

Many thanks in advance.

Regards,
Legion

Posted: 2007-02-06 14:11:22
by yeti
I've fixed this some weeks ago. You can download the script at

http://home.arcor.de/aspg/files/OFDb-DE.rar

edit: The script reads the detail page to get the full Actors list!

HTH,
yeti

Posted: 2007-02-06 18:51:50
by antp
Thanks, I added it with the other scripts.

Posted: 2007-02-06 22:19:10
by Legion
Many Thanks for your work!!

Regards,
Legion

Posted: 2007-03-11 09:28:54
by yeti
Hi,

I've updated the OFDB.de-Script again.

Code: Select all

1.0.2 (03/06/2007) by yeti
- Chg: Code cleanup
- New: Option to import the description as is, include all line feeds.
  Standard is reformat as before.
- Fix: The last change in actors loading from the cast/crew details page
  reads the crew names too :( Hope I've finally fixed this now.
Same download link as before.

Antoine, please update it on your server.

Posted: 2007-03-11 22:08:05
by antp
done

Posted: 2007-05-20 01:47:45
by DarkS
Hmm. Its strange no one mentioned this problem yet, but the current OFDB script doesn't work if there are just a few actors (without "[mehr]" part) on the page. Then it imports just an empty string instead of actors names. To prevent this behavior you have to comment out (or delete) line 158 in the script.

Here's the part of the code (second line) that I mean:

Code: Select all

     begin
       //Line := TextBefore(Line, '<font style="font-size: 11px;"', '');
       Line := StringReplace(Line, '<br><a', ', <br><a');
       HTMLRemoveTags(Line);
       SetField(fieldActors, Line);
     end;
Maybe you can fix it in your script.

Posted: 2007-06-11 15:39:12
by yeti
You are right. Thanks. I uploaded an updated script.

http://home.arcor.de/aspg/files/OFDb-DE.rar

Because I've tested this for the version 1.0.2, I think ofdb has changed the page after my release. But most of my movies have a [mehr]-Link, so I didn't find out this bug.

Bye,
yeti

Posted: 2007-09-09 01:00:38
by DarkS
There is another bug in OFDB script. This time within the description part. The behavior is the same as it was with actors.

To fix this bug replace following code (line 181)

Code: Select all

  // Description
  LineNr := Findline('<b>Inhalt:</b>', Page, 0);
  if LineNr > -1 then
  begin
    LineNr := Findline('<a href="view.php?page=inhalt', Page, 0);
    Line := Page.GetString(LineNr);
    BeginPos := Pos('<a href="view.php?page=inhalt', Line) + 9;
    EndPos := Pos('"><b>[mehr]', Line);
    Value := Copy(Line, BeginPos, EndPos - BeginPos);
    GetDescriptions(Value);
  end;
with this

Code: Select all

  // Description
  LineNr := Findline('<b>Inhalt:</b>', Page, 0);
  LineNrTmp := LineNr;
  if LineNr > -1 then
  begin
    LineNr := Findline('<a href="view.php?page=inhalt', Page, 0);
    if LineNr > -1 then
    begin //"[mehr]" part exists
      Line := Page.GetString(LineNr);
      BeginPos := Pos('<a href="view.php?page=inhalt', Line) + 9;
      EndPos := Pos('"><b>[mehr]', Line);
      Value := Copy(Line, BeginPos, EndPos - BeginPos);
      GetDescriptions(Value);
    end else
    begin //No "[mehr]" part exists
      Line := Page.GetString(LineNrTmp);
      Value := TextBetween(Line, '<b>Inhalt:</b>', '</p></font></td>');
      SetField(fieldDescription, FullTrim(Value));
    end;
  end;
and define a new Integer variable "LineNrTmp" in line 69.

I hope it can't happen that a description without [mehr] part goes over multiple lines. Because for this situation this fix wouldn't work as well.