2008-10-21, 22:50
updated scraper is now in svn, r15969
<!--URL to Google and Fanart-->
<RegExp conditional="fanart" input="$$8" output="<url function="GoogleToIMDB">http://www.google.com/search?q=site:imdb.com+moviemaze\1</url>" dest="5+">
<RegExp input="$$1" output="\1" dest="7">
<expression><h2>\((.*)\)<</expression>
</RegExp>
<RegExp input="$$7" output="+\1" dest="8+">
<expression repeat="yes">([^ ,]+)</expression>
</RegExp>
<expression></expression>
</RegExp>
<!--GoogleToIMDB-->
<GoogleToIMDB dest="5">
<RegExp input="$$2" output="<?xml version="1.0" encoding="iso-8859-1" standalone="yes"><details>\1</details>" dest="5">
<RegExp input="$$1" output="<url function="GetFanart">http://api.themoviedb.org/backdrop.php?imdb=\1</url>" dest="2+">
<expression>/title/([t0-9]*)</expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
</GoogleToIMDB>
<!-- Fanart -->
<GetFanart dest="5">
<RegExp input="$$2" output="<details><fanart url="http://themoviedb.org/image/backdrops">\1</fanart></details>" dest="5">
<RegExp input="$$1" output="<thumb preview="/\1/\2_poster.jpg">/\1/\2.jpg</thumb>" dest="2">
<expression repeat="yes">/([0-9]*)/([t0-9-]*).jpg</URL</expression>
</RegExp>
<expression noclean="1">(.+)</expression>
</RegExp>
</GetFanart>
w00dst0ck Wrote:SVN: https://xbmc.svn.sourceforge.net/svnroot...ers/video/
@HectorziN:
It is possible to get the IMDB Link with a google search.
site:imdb.com +original title +year
I'm using a google wrapper to get the IMDB ID for fanart at my moviemaze scraper.
Code:<!--URL to Google and Fanart-->
<RegExp conditional="fanart" input="$$8" output="<url function="GoogleToIMDB">http://www.google.com/search?q=site:imdb.com+moviemaze\1</url>" dest="5+">
<RegExp input="$$1" output="\1" dest="7">
<expression><h2>\((.*)\)<</expression>
</RegExp>
<RegExp input="$$7" output="+\1" dest="8+">
<expression repeat="yes">([^ ,]+)</expression>
</RegExp>
<expression></expression>
</RegExp>
<!--GoogleToIMDB-->
<GoogleToIMDB dest="5">
<RegExp input="$$2" output="<?xml version="1.0" encoding="iso-8859-1" standalone="yes"><details>\1</details>" dest="5">
<RegExp input="$$1" output="<url function="GetFanart">http://api.themoviedb.org/backdrop.php?imdb=\1</url>" dest="2+">
<expression>/title/([t0-9]*)</expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
</GoogleToIMDB>
<!-- Fanart -->
<GetFanart dest="5">
<RegExp input="$$2" output="<details><fanart url="http://themoviedb.org/image/backdrops">\1</fanart></details>" dest="5">
<RegExp input="$$1" output="<thumb preview="/\1/\2_poster.jpg">/\1/\2.jpg</thumb>" dest="2">
<expression repeat="yes">/([0-9]*)/([t0-9-]*).jpg</URL</expression>
</RegExp>
<expression noclean="1">(.+)</expression>
</RegExp>
</GetFanart>
spiff Wrote:oh, and the search string encoding worked fine for me. i made a directory named cariño, set content, did the lookup. got the list your url pointed to.
HectorziN Wrote:Thanks! it is a great idea but.... always returns the same movie? it could return a wrong one, right?
spiff Wrote:
i repeat;
i made a directory named cariño, set content (including scan by dir name obviously), did the lookup. got the list your url pointed to.
w00dst0ck Wrote:I use xbmc for windows and watch the xbmc.log
There are also some online RegEx testers.