[REQ] ofdb.de FIX! 2 fields doesnt work anymore!
[REQ] ofdb.de FIX! 2 fields doesnt work anymore!
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
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
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
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
Last edited by bad4u on 2006-12-25 14:10:45, edited 1 time in total.
Thanksbad4u wrote:
*** Would be nice to upload this script to antp website ***
I added it to www.antp.be/temp/scripts/
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
http://home.arcor.de/aspg/files/OFDb-DE.rar
edit: The script reads the detail page to get the full Actors list!
HTH,
yeti
Hi,
I've updated the OFDB.de-Script again.
Same download link as before.
Antoine, please update it on your server.
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.
Antoine, please update it on your server.
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:
Maybe you can fix it in your 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;
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
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
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)
with this
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.
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;
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;
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.