![]() |
|
|||||||
| Scraper Development Developers forum for meta data scrapers. Scraper developers only! Not for posting feature requests, bugs, or end-user support requests! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2009
Posts: 51
![]() |
Hi
Im have installed apache/mysql/php on my media server (192.168.0.10), and have a script that responds to (for example) http://192.168.0.10/search.php?videoID=tt4638525 with an xml like this Code:
<?xml version="1.0" encoding="UTF-8"?>
<movie>
<details>
<title></title>
<year></year>
<director></director>
<top250></top250>
<mpaa></mpaa>
<tagline></tagline>
<runtime></runtime>
<thumb></thumb>
<credits></credits>
<rating></rating>
<votes></votes>
<genre></genre>
<actor>
<name></name>
<role></role>
</actor>
<outline></outline>
<plot></plot>
</details>
</movie>
Code:
<scraper name="LocalMedia" content="movies" thumb="LocalMedia.gif">
<NfoUrl dest="3">
<RegExp input="$$1" output="http://192.168.0.10/search.php?videoID=/1" dest="3">
<expression noclean="1">192.168.0.10/(.*)</expression>
</RegExp>
</NfoUrl>
<CreateSearchUrl>
<RegExp>
<expression></expression>
</RegExp>
</CreateSearchUrl>
<GetSearchResults>
<RegExp>
<expression></expression>
</RegExp>
</GetSearchResults>
<GetDetails>
<RegExp>
<expression></expression>
</RegExp>
</GetDetails>
</scraper>
|
|
|
|
|
|
#2 |
|
Aeon Group
Join Date: Mar 2004
Posts: 111
![]() |
I don't know why you want to make this way and I am not really good at regex as well.
It should be really simple to do. Code:
<GetDetails dest="3"> <RegExp input="$$5" output="<details>\1</details>" dest="3"> <RegExp input="$$1" output="<title>\1</title>" dest="5"> <expression noclean="1"><title>(.[^<]*)</expression> </RegExp> <RegExp input="$$1" output="<year>\1</year>" dest="5+"> <expression noclean="1"><year>(.[^<]*)</expression> </RegExp> <expression noclean="1"></expression> </RegExp> </GetDetails> I don't know how your search.php output search results. I can not help on that. |
|
|
|
|
|
#3 |
|
Grumpy Bastard Developer
Join Date: Nov 2003
Posts: 7,715
![]() |
afaict the response is almost the xbmc format. if so;
Code:
<GetDetails dest="3">
<RegExp input="$$1" output="\1\2" dest="3">
<expression noclean="1">(.*)<movie>(.*)</movie></expression>
</RegExp>
</GetDetails>
Code:
<GetDetails dest="3">
<RegExp input="$$1" output="\1" dest="3">
<expression noclean="1"/>
</RegExp>
</GetDetails>
Code:
<NfoUrl dest="3">
<RegExp input="$$1" output="\1" dest="3">
<expression>(http://192.168.0.10/.*)</expression>
</RegExp>
</NfoUrl>
__________________
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-03-22 at 01:00. |
|
|
|
|
|
#4 |
|
Aeon Group
Join Date: Mar 2004
Posts: 111
![]() |
Wow way better and simple ;P
|
|
|
|
|
|
#5 |
|
Member
Join Date: Mar 2009
Posts: 51
![]() |
wow, thanks for the quick responses.
The reason im wanting to do it this way is to keep all my xbox's syncronised. ive got a scraper that i made in vb, which adds the details scraped to the mysql. My figuring is that my 100Mbps home network is WAAAAAAAAY faster than my broadband (0.5Mbps) so my scraper examines my media folders then scrapes anything is needed. Now the files and data are stored locally on my highspeed network - and available to all the xbox's when they run their update, and hopefully they will all update much quicker. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|