XBMC Community Forum  

Go Back   XBMC Community Forum > Development > Scraper Development

Scraper Development Developers forum for meta data scrapers. Scraper developers only!
Not for posting feature requests, bugs, or end-user support requests!

Reply
 
Thread Tools Search this Thread Display Modes
Old 2009-04-22, 23:01   #1
Schenk2302
Member
 
Join Date: Feb 2009
Posts: 96
Schenk2302 is on a distinguished road
Default Quick Scraper Question (Hope so:))

Hi everyone,

i try to make a scraper but can't get ahead with one step.

I use scrap.exe to test my scraper:

CreateSearchUrl returned is okay!

GetSearchResults returned is okay !

Details URL is okay !

but then the GetDetails returned: is nothing with the Error: Unable to parse details.xml

Here's my code:

PHP Code:
<scraper name="TEST" content="movies" thumb="cinefacts.gif" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" language="de">
    <
CreateSearchUrl dest="3">
        <
RegExp input="$$1" output="http://www.cinefacts.de/suche/suche.php?name=\1" dest="3">
            <
expression noclean="1"/>
        </
RegExp>
    </
CreateSearchUrl>
    <
GetSearchResults dest="8">
        <
RegExp input="$$5" output="&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot; standalone=&quot;yes&quot;?&gt;&lt;results&gt;\1&lt;/results&gt;" dest="8">
            <
RegExp input="$$1" output="&lt;entity&gt;&lt;title&gt;\3 \4&lt;/title&gt;&lt;url&gt;http://www.cinefacts.de/kino/\1/\2/filmdetails.html&lt;/url&gt;&lt;/entity&gt;" dest="5">
                <
expression repeat="yes">&gt;&lt;a href=&quot;/kino/([0-9]*)/(.[^/]*)/filmdetails.html&quot;&gt;[^&gt;]*(.[^&lt;]*)&lt;/b&gt;&lt;/a&gt;&lt;br&gt;[^&gt;]*[^t]+t+[^&nbsp;]+[^0-9]+([^&lt;]+)</expression>
            </
RegExp>
            <
expression noclean="1"/>
        </
RegExp>
    </
GetSearchResults>
    <
GetDetails dest="3">
        <
RegExp input="$$5" output="&lt;details&gt;\1&lt;/details&gt;" dest="3">
            <!--
Title -->
            <
RegExp input="$$1" output="&lt;title&gt;\1&lt;/title&gt;" dest="5+">
                <
expression trim="1" noclean="1">&lt;h1&gt;([^&lt;]*)</expression>
            </
RegExp>
                </
RegExp>
        </
GetDetails>
</
scraper
Maybe someone could have a quick look at this and tell me the direction to get it right.

Thanks so much in advance

Schenk
Schenk2302 is offline   Reply With Quote
Old 2009-04-22, 23:07   #2
spiff
Grumpy Bastard Developer
 
spiff's Avatar
 
Join Date: Nov 2003
Posts: 7,715
spiff is on a distinguished road
Default

unfortunately scrap.exe is outdated and we lost the source.

and the reason it does not work is that you are missing the expression for the outermost RegExp in GetDetails, i.e.
Code:
....
</RegExp>
<expression noclean="1"/>
</RegExp>
</GetDetails>
__________________
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.

Last edited by spiff; 2009-04-22 at 23:19.
spiff is offline   Reply With Quote
Old 2009-04-22, 23:30   #3
Schenk2302
Member
 
Join Date: Feb 2009
Posts: 96
Schenk2302 is on a distinguished road
Default

Hi Spiff,

thanks for your answer, that solved the problem with scrap.exe

But now i tried it in XBMC and it doesn't work. i know that scrap.exe is outdated but is there any chance to see at which point XBMC stuck with my scrapper or better why it not works. any scrapper logs At this point i have absolutely no clue where to start and find the error because with scrap.exe it's just fine. Thanks again for any hints or infos.

Greetz

Schenk
Schenk2302 is offline   Reply With Quote
Old 2009-04-22, 23:32   #4
spiff
Grumpy Bastard Developer
 
spiff's Avatar
 
Join Date: Nov 2003
Posts: 7,715
spiff is on a distinguished road
Default

my answer depends on two things;
1) you speak c++ and can compile
or
2) you can compile
or
3) neither
__________________
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.
spiff is offline   Reply With Quote
Old 2009-04-22, 23:36   #5
Schenk2302
Member
 
Join Date: Feb 2009
Posts: 96
Schenk2302 is on a distinguished road
Default



maybe 2) better 3)

Could you explain why?

Thanks

Schenk
Schenk2302 is offline   Reply With Quote
Old 2009-04-22, 23:37   #6
spiff
Grumpy Bastard Developer
 
spiff's Avatar
 
Join Date: Nov 2003
Posts: 7,715
spiff is on a distinguished road
Default

if 1 i could gotten away with instructions
2 means i'll have to do a patch for you which i will do shortly - here it is; http://dureks.dyndns.org:8080/scraperlog.diff
3 means i don't have to do anything

__________________
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.

Last edited by spiff; 2009-04-22 at 23:41.
spiff is offline   Reply With Quote
Old 2009-04-22, 23:40   #7
Schenk2302
Member
 
Join Date: Feb 2009
Posts: 96
Schenk2302 is on a distinguished road
Default

Quote:
Originally Posted by spiff View Post
if 1 i could gotten away with instructions
2 means i'll have to do a patch for you which i will do shortly
3 means i don't have to do anything


2 sound like i could try
3 makes me crying because i want that Cinefacts Scraper working
Schenk2302 is offline   Reply With Quote
Old 2009-04-22, 23:43   #8
Schenk2302
Member
 
Join Date: Feb 2009
Posts: 96
Schenk2302 is on a distinguished road
Default

little side note:

i made a cinefacts.de scraper for MediaPortal but now switched to XBMC and would like to use it here. It was even hard for me to do this in MP, in XBMC i'm getting depressed because it's totally different
Schenk2302 is offline   Reply With Quote
Old 2009-04-22, 23:45   #9
spiff
Grumpy Bastard Developer
 
spiff's Avatar
 
Join Date: Nov 2003
Posts: 7,715
spiff is on a distinguished road
Default

heh, different does not mean bad. don't give up, you'll get the hang of it =P
__________________
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.
spiff is offline   Reply With Quote
Old 2009-04-22, 23:53   #10
Schenk2302
Member
 
Join Date: Feb 2009
Posts: 96
Schenk2302 is on a distinguished road
Default

Spiff, i know i'm kind of lazy yet but is there a compiled version with your patch to download or do i really have to compile by my own, what makes me really afraid
Schenk2302 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:25.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2008, XBMC Project