OFDB scraper

This is my first "release" of the ofdb (germen version of imdb) scraper.

The mainfeatures work, but there are some problems:

- Umlauts are not readable (??siteencoding??)

- i parse the genres into individual tags (not only one genre tag; mabe one could change this in the scraper parser code (In databases you should not store lists in attributes Smile )) If this will not be changed, then i will change the parser...

- atm no original title since there is no tag for it
- mpaa is only fetched if there is the movie was in the cinemas... (addition here: maybe some possibility to check if a regex failed. example:

PHP Code:
<regex name"theregextocheck" .../>
Regex name="aName" condition="theregextocheck"> <!--this one will only be called if the condition does match--> 
cheers morte
i have no idea how ofdb expects its urls to be encoded. it certainly does not use normal url encoding (umlauts SHOULD be encoded, it does not accept that).

several <genre> tags, sure. i dont see why this is easier to do than the current / separated list though. as for storing them like that in the db, its to speed up the queries, constructing the / separated string each time takes time....

just add the original title as a tag, we will get it in there eventually.

as for those conditions, they are easily simulated using two regexps + clear="#ofbuffer". let one regexp grab the conditional block, clearing the buffer no matter what. then the next expression will either have nothing to look through (and hence fail), or you did grab something during the first expression so they will succeed....
encoding the urls is the one thing... but the other thing is, that you cant read the results. in the list, where you can choose the the movie the umlauts work like a charm, but e.g. the plot is not readable if there are umlauts in it.

the thing with the genre is given through a db design pattern... it is normal not to store lists in an attribute. it also should make the genre-queries easier, since you do not have to split the result of the genre but only to iterate through all genre tags to find the movies with the needed genre...

the original title will be added, and the condition thing will be testet Smile

thanks for the response

spiff: Any chance of integrating this ofdb scraper to SVN when its stable and finished? Or should the users download this scraper by themselves?

Don't know how it is planned for all future scrapers?

My XBOX built into a Sony Hifi CD-Player Case
XBOX Hifi Media Center Picture Gallery

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

yes ofc we will stick it in svn.

everything deemed to be of high enough quality will be stuck in svn. the more the merrier
So here is the version with the original title (<originaltitle>)!

It also reorders the title: Matrix, the => The Matrix
If someone does not want this behaviour, then tell me and i write another version..

CYA Morte
Quote:<RegExp input="$$1" output="&lt;horst&gt;\1&lt;/horst&gt;" dest="8">
.. horst Big Grin

well, thats some debugging tag... forgot to delete it.. but as long as it works... Smile


cheers morte
I'll try it later this evening and report back!

BTW: Horst is a nice name for a debugging tag Wink Are there Karl and Hans in the script, too *LOL* jk
Wetek Play: LibreELEC 9.0.x as TVH-server --- Odroid N2: CoreELEC 19.1 --- Orbsmart 500 Android 19.1 as Online-radio/TV in the kitchen
Quote:encoding the urls is the one thing... but the other thing is, that you cant read the results. in the list, where you can choose the the movie the umlauts work like a charm, but e.g. the plot is not readable if there are umlauts in it.
Thats the only "bug" i noticed so far. Nice scraper!
Wetek Play: LibreELEC 9.0.x as TVH-server --- Odroid N2: CoreELEC 19.1 --- Orbsmart 500 Android 19.1 as Online-radio/TV in the kitchen
Revision: 7816
Author: spiff_
Date: 2007-02-12 10:06:31 -0800 (Mon, 12 Feb 2007)

Log Message:
fixed: various encoding related stuff in scraper code. should fix ofdb.

Revision: 7817
Author: spiff_
Date: 2007-02-12 10:22:03 -0800 (Mon, 12 Feb 2007)

Log Message:
added: original title column to video database (still not accessible from ui).

Revision: 7819
Author: spiff_
Date: 2007-02-12 12:26:44 -0800 (Mon, 12 Feb 2007)

Log Message:
changed: allow multiple <genre>, <director> and <credits>< tags in scraper xml output.

now, what did you have in mind. just an info label or something more substantial?

also; please confirm my fixes, then feel free to hand me a dehorstified version and i'll add it to svn.

suggested change:

<RegExp input="$$1" output="&lt;genre&gt;\1&lt;/genre&gt;" dest="5+">
<expression repeat="yes">view.php\?page=genre&amp;Genre=[^&quot;]+&quot;&gt;([^&lt;]*)&lt;</expression>

an infolabel should be adequat for the original title.

THANKS for all the fixes!!
(i'll test it as soon asap)

Quote:dehorstified version

the version without horst is attached Smile

cheers morte
Now the scraper seems to work!


Great Work!!!
A few hours ago I noticed that spiff made some changes to get ofdb work and i thougt to make a second try to get my scraper working, but a second SVN Checkout shows me that you've already done it!

And it works fine... with some problems for me... Huh

The plot (Parsing on Inhaltsangabe.htm) works not for all movies

it works only for 1 out of 9 movies of 2007
and 6 out of 16 of 2006

Movies who don't work for example (2006):
"Catch a Fire", "Haus am See", "Depaerted", "Das Parfum", "Dead or Alive",
"Spiel der Macht"
The plot html page for these movies seems to be a bit different, but it's to late for me now to have a deep look...

@morte 0815 & spiff

There are sometimes problems with the Minus Character '-'.
It is only possible to fiind some movies by remove the '-' in the search string, but in the title on ofdb it is in the name then....
Exampe "Departed - Unter Feinden" will only be found if I remove the '-'. Then "Departed - Unter Feinden (2006)..." is found. In the Browser Search it works with the '-'. Could this be a problem with different but same looking characters?
Perhaps it is possible to remove these characters from the search string, this should fix the problem...

There are problems with "Der" too.
Example: "Das Haus am See" will only be found, if I manual remove the "Das". Then the movie is found: "Haus am See, Das / Lake House, The (2006)". This doesn't work in Browser too, so I think that's a problem with ofdb...

Will the moviename.nfo File in the movie folder be observed for the url-search?

This is no criticism. I only try to help to make this great scraper to a fantastic scraper... Laugh

Big Grin1. thanks for your help. Big Grin

2. the problems:
I simply didnt test movies where a linebreak occured in the plot. So here is an updated version.

The thing with "der, die, das, the": i know of the problem, but i do not have any idea how to fix this... i tried simply cutting off those words if they occure on the beginning, but then it didnt find "die hard". So if you have an idea please let me know.

the "-"-problem: i will try to fix this.

so long


Logout Mark Read Team Forum Stats Members Help
OFDB scraper0
This forum uses Lukasz Tkacz MyBB addons.