The branch, dharma has been updated
via 24a75935192ce9b9e8b277947db6d3d95564c77e (commit)
from 181f3c1dde55d37738f4b63e7ff4321f050fbf28 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scrapers;a=commit;h=24a75935192ce9b9e8b277947db6d3d95564c77e
commit 24a75935192ce9b9e8b277947db6d3d95564c77e
Author: olympia <[email protected]>
Date: Thu May 5 07:21:28 2011 +0200
[metadata.ptgate.pt] fix broken scraper
diff --git a/metadata.ptgate.pt/addon.xml b/metadata.ptgate.pt/addon.xml
index 50b8abf..dda6a94 100644
--- a/metadata.ptgate.pt/addon.xml
+++ b/metadata.ptgate.pt/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="metadata.ptgate.pt"
name="PTGate"
- version="1.1.1"
+ version="1.2.0"
provider-name="apaneiro">
<requires>
<import addon="xbmc.metadata" version="1.0"/>
@@ -24,6 +24,5 @@
<description lang="kr">cinema.ptgate.pt ìì ìí ì ë³´
ë¤ì´ë¡ë</description>
<description lang="pl">Pobieraj informacje o filmach z
cinema.ptgate.pt</description>
<description lang="pt">Descarregar informação de filmes de
cinema.ptgate.pt</description>
- <broken>Portal layout has changed.</broken>
</extension>
</addon>
diff --git a/metadata.ptgate.pt/ptgate.xml b/metadata.ptgate.pt/ptgate.xml
index ae1d104..57e404c 100644
--- a/metadata.ptgate.pt/ptgate.xml
+++ b/metadata.ptgate.pt/ptgate.xml
@@ -1,202 +1,210 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scraper framework="1.1" date="2009-08-10">
- <NfoUrl dest="3">
- <RegExp input="$$1" output="<url>\1</url>" dest="3">
- <expression clear="yes"
noclean="1">(http://www.cinema.ptgate.pt/filmes/[0-9]*)</expression>
- </RegExp>
- </NfoUrl>
- <CreateSearchUrl dest="3">
- <RegExp input="$$1"
output="<url>http://www.cinema.ptgate.pt/pesquisa/?q=\1</url>"
dest="3">
- <expression noclean="1">([^\(]+)</expression>
- </RegExp>
- </CreateSearchUrl>
- <GetSearchResults dest="8">
- <RegExp input="$$5" output="<?xml version="1.0"
encoding="iso-8859-1"
standalone="yes"?><results>\1</results>" dest="8">
- <RegExp dest="5+" input="$$1"
output="<entity><title>\2 - \4
(\3)</title><url>http://www.cinema.ptgate.pt/filmes/\1</url><id>\1</id></entity>">
- <expression repeat="yes" trim="2,3"><a
href="/filmes/([0-9]*)">(.*?)</a>
<small>([^\(]*)\(([0-9]*)\)</expression>
- </RegExp>
- <RegExp dest="5" input="$$1"
output="<entity><title>\2 - \3
(\4)</title><url>http://www.cinema.ptgate.pt/filmes/\1</url><id>\1</id></entity>">
- <expression trim="2,4"><a
href="/filmes/([0-9]*)"
class="upper">([^<]*)</a> <small>\(([0-9]*)\)<br
/>([^<]*)</expression>
- </RegExp>
- <expression noclean="1"/>
- </RegExp>
- </GetSearchResults>
- <GetDetails clearbuffers="no" dest="3">
- <RegExp input="$$5" output="<details>\1</details>"
dest="3">
- <!-- Id -->
- <RegExp dest="5" input="$$2"
output="<id>\1</id>">
- <expression/>
- </RegExp>
- <!-- Title -->
- <RegExp dest="5+" input="$$1"
output="<title>\1</title>">
-
<expression><h2>([^<]*)</h2></expression>
- </RegExp>
- <!-- Plot -->
- <RegExp dest="5+" input="$$1"
output=";<plot>\1</plot>">
-
<expression><b>sinopse[^\n]*\s+([^\n]*)</expression>
- </RegExp>
- <!-- Outline -->
- <RegExp dest="5+" input="$$1"
output="<outline>\1</outline>">
-
<expression><b>sinopse[^\n]*\s+(.*?[^A-Z]\.)</expression>
- </RegExp>
- <!-- Genre -->
- <RegExp dest="5+" input="$$9"
output="<genre>\1</genre>">
- <RegExp dest="9" input="$$1" output="\1,">
- <expression><b>g.nero</b>:
([^<]*)</expression>
- </RegExp>
- <expression repeat="yes"
trim="1">([^,]+),</expression>
- </RegExp>
- <!-- Year -->
- <RegExp dest="11" input="$$1"
output="<year>\1</year>">
- <expression><b>ano</b>:
([^<]*)</expression>
- </RegExp>
- <RegExp dest="5+" input="$$11" output="\1">
- <expression noclean="1"/>
- </RegExp>
- <!-- Actor -->
- <RegExp dest="8" input="$$9"
output="<actor><name>\1</name></actor>">
- <RegExp input="$$1" output="\1," dest="9">
-
<expression><b>int.rpretes</b><br />\s*(.*?)<br
/></expression>
- </RegExp>
- <expression clear="yes" repeat="yes"
trim="1">([^,]*),</expression>
- </RegExp>
- <RegExp dest="4" input="$$8"
output="<actors>\1</actors>">
- <expression noclean="1"/>
- </RegExp>
- <RegExp dest="5+" input="$$8" conditional="ptgateonly"
output="\1">
- <expression noclean="1"/>
- </RegExp>
- <!-- Director -->
- <RegExp dest="8" input="$$9"
output="<director>\1</director>">
- <RegExp input="$$1" output="\1," dest="9">
-
<expression><b>realiza..o</b><br />\s*(.*?)<br
/></expression>
- </RegExp>
- <expression repeat="yes"
trim="1">([^,]+),</expression>
- </RegExp>
- <RegExp dest="4+" input="$$8"
output="<directors>\1</directors>">
- <expression noclean="1"/>
- </RegExp>
- <RegExp dest="5+" input="$$8" conditional="ptgateonly"
output="\1">
- <expression noclean="1"/>
- </RegExp>
- <!-- Add PTGate image as last Thumb -->
- <RegExp dest="12" input="$$2"
output="<thumb>http://www.cinema.ptgate.pt/Movies/\1.jpg</thumb>">
- <expression/>
- </RegExp>
- <RegExp dest="5+" input="$$12" conditional="ptgateonly"
output="\1">
- <expression noclean="1"/>
- </RegExp>
- <!-- Add PT Distributor -->
- <RegExp dest="13" input="$$1"
output="<studio>Dist: \1</studio>">
- <expression><b>distribuidora</b>:
([^<]*)</expression>
- </RegExp>
- <RegExp dest="5+" input="$$13" conditional="ptgateonly"
output="\1">
- <expression noclean="1"/>
- </RegExp>
- <!-- IMDB Details -->
- <RegExp dest="5+" input="$$10"
conditional="!ptgateonly" output="\1">
- <!-- Use Google as last resort -->
- <RegExp dest="10" input="$$8" output="<url
function="GetIMDBfromGoogle">http://www.google.com/search?q=site:imdb.com\1</url>">
- <!-- search google for the original
title -->
- <RegExp input="$$1" output="\1"
dest="7">
- <expression
trim="1">\&#8250; ([^<]+)<br /></expression>
- </RegExp>
- <!-- add year to search string -->
- <RegExp input="$$11" output="+\1"
dest="8">
- <expression/>
- </RegExp>
- <!-- remove spaces and , -->
- <RegExp input="$$7" output="+\1"
dest="8+">
- <expression repeat="yes">([^
,]+)</expression>
- </RegExp>
- <expression/>
- </RegExp>
- <!-- use IMDB link on PTGATE, when available -->
- <RegExp dest="10" input="$$9" output="<url
function="GetIMDBDetails">http://akas.imdb.com/title/\1/</url>">
- <RegExp dest="9" input="$$1"
output="\1">
- <expression
clear="yes">\.imdb\.com/title/(tt[0-9]*)</expression>
- </RegExp>
- <expression>(.+)</expression>
- </RegExp>
- <expression noclean="1"/>
- </RegExp>
- <expression noclean="1"/>
- </RegExp>
- </GetDetails>
- <GetIMDBfromGoogle clearbuffers="no" dest="3">
- <RegExp input="$$5" dest="3"
output="<details>\1</details>">
- <RegExp input="$$1" dest="5" output="<url url
cache="tt\1-main.html"
function="GetIMDBDetails">http://akas.imdb.com/title/\1/</url>">
-
<expression>\.imdb\.com/title/(tt[0-9]*)</expression>
- </RegExp>
- <expression noclean="1"/>
- </RegExp>
- </GetIMDBfromGoogle>
- <GetIMDBDetails clearbuffers="no" dest="3">
- <RegExp input="$$5" dest="3"
output="<details>\1</details>">
- <!-- IMDB Id -->
- <RegExp input="$$1" dest="2" output="\1">
- <expression>id=(tt[t0-9]*)</expression>
- </RegExp>
- <!-- Studio -->
- <RegExp input="$$1"
output="<studio>\1</studio>" dest="5">
- <expression
repeat="yes">"/company/[^>]+>([^<]+)</a></expression>
- </RegExp>
- <RegExp input="$$13" output="\1" dest="5+">
- <expression noclean="1"/>
- </RegExp>
- <!-- Runtime -->
- <RegExp input="$$1"
output="<runtime>\1</runtime>" dest="5+">
- <expression
trim="1"><h4[^>]*?>Runtime:</h4>[^0-9]*([0-9]+)</expression>
- </RegExp>
- <!-- Rating -->
- <RegExp input="$$1"
output="<rating>\1</rating><votes>\2</votes>" dest="5+">
- <expression><span
class="rating-rating">([0-9.]+).*?>([0-9,]+) votes</a></expression>
- </RegExp>
- <!-- Actor -->
- <RegExp conditional="!fullcredits" input="$$2"
output="<chain function="GetIMDBCastById">$$2</chain>"
dest="5+">
- <expression/>
- </RegExp>
- <!-- Director -->
- <RegExp conditional="!fullcredits" output="<chain
function="GetIMDBDirectorsById">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Credits -->
- <RegExp conditional="!fullcredits" output="<chain
function="GetIMDBWritersById">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Actor, full -->
- <RegExp conditional="fullcredits" input="$$2"
output="<chain
function="GetIMDBFullCastById">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Director, full -->
- <RegExp conditional="fullcredits" input="$$2"
output="<chain
function="GetIMDBFullDirectorsById">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Credits, full -->
- <RegExp conditional="fullcredits" input="$$2"
output="<chain
function="GetIMDBFullWritersById">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Thumb, IMPAwards -->
- <RegExp conditional="impawards" input="$$2"
output="<chain function="GetIMPAThumbsById">$$2</chain>"
dest="5+">
- <expression/>
- </RegExp>
- <!-- Poster, MoviePosterDB -->
- <RegExp conditional="movieposterdb" input="$$1"
output="<chain
function="GetMoviePosterDBThumbs">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Trailer -->
- <RegExp conditional="trailer" input="$$1"
output="<url
function="GetIMDBTrailer">http://akas.imdb.com/video/imdb/vi\1/player</url>"
dest="5+">
- <expression>/vi([0-9]*)/"</expression>
- </RegExp>
- <!-- Thumb, IMDB -->
- <RegExp input="$$2" output="<chain
function="GetTMDBThumbsByIdChain">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <!-- Fanart -->
- <RegExp conditional="fanart" input="$$2"
output="<chain
function="GetTMDBFanartByIdChain">$$2</chain>" dest="5+">
- <expression/>
- </RegExp>
- <expression noclean="1"/>
- </RegExp>
- </GetIMDBDetails>
-</scraper>
+<?xml version="1.0" encoding="UTF-8"?>
+<scraper framework="1.1" date="2011-02-20">
+ <NfoUrl dest="3">
+ <RegExp dest="3" input="$$1" output="<url>\1</url>">
+ <expression clear="yes"
noclean="1">(http://cinema.ptgate.pt/filmes/[0-9]*)</expression>
+ </RegExp>
+ </NfoUrl>
+ <CreateSearchUrl dest="3" SearchStringEncoding="iso-8859-1">
+ <RegExp dest="3" input="$$1"
output="<url>http://cinema.ptgate.pt/pesquisa/avancada?n=\1&y=$$4</url>">
+ <RegExp input="$$2" output="\1" dest="4">
+ <expression clear="yes">(.+)</expression>
+ </RegExp>
+ <expression noclean="1">([^\(\[]+)</expression>
+ </RegExp>
+ </CreateSearchUrl>
+ <GetSearchResults dest="8">
+ <RegExp dest="8" input="$$5" output="<?xml
version="1.0" encoding="iso-8859-1"
standalone="yes"?><results>\1</results>">
+ <RegExp dest="5" input="$$1"
output="<entity><title>\2 - \4
(\3)</title><url>http://cinema.ptgate.pt/filmes/\1</url><id>\1</id></entity>">
+ <expression repeat="yes" trim="2,3"><a
href="/filmes/([0-9]*)">(.*?)</a>
<small>([^\(]*)\(([0-9]*)\)</expression>
+ </RegExp>
+ <expression noclean="1"/>
+ </RegExp>
+ </GetSearchResults>
+ <GetDetails clearbuffers="no" dest="3">
+ <RegExp dest="3" input="$$5"
output="<details>\1</details>">
+ <!-- Id -->
+ <RegExp dest="5" input="$$2"
output="<id>\1</id>">
+ <expression/>
+ </RegExp>
+ <!-- Title -->
+ <RegExp dest="5+" input="$$1"
output="<title>\1</title>">
+
<expression><title>([^<\(]*)</expression>
+ </RegExp>
+ <!-- Original Title -->
+ <RegExp dest="5+" input="$$1"
output="<originaltitle>\1</originaltitle>">
+ <expression><h2
class="title">([^<\.]*)</expression>
+ </RegExp>
+ <!-- Plot -->
+ <RegExp dest="5+" input="$$1"
output=";<plot>\1</plot>">
+ <expression
trim="1"><h2>sinopse</h2>\s*<p>\s*([^<]*)</expression>
+ </RegExp>
+ <!-- Outline -->
+ <RegExp dest="5+" input="$$1"
output="<outline>\1</outline>">
+ <expression
trim="1"><h2>sinopse</h2>\s*<p>\s*([^<\.]*)</expression>
+ </RegExp>
+ <!-- Genre -->
+ <RegExp dest="5+" input="$$9"
output="<genre>\1</genre>">
+ <RegExp dest="9" input="$$1" output="\1,">
+ <expression
trim="1"><b>G.nero:</b> ([^<]*)</expression>
+ </RegExp>
+ <expression repeat="yes"
trim="1">([^,]+),</expression>
+ </RegExp>
+ <!-- Country -->
+ <RegExp dest="5+" input="$$9"
output="<country>\1</country>">
+ <RegExp dest="9" input="$$1" output="\1,">
+ <expression><b>Pa.s:</b>
([^<]*)</expression>
+ </RegExp>
+ <expression repeat="yes"
trim="1">([^,]+),</expression>
+ </RegExp>
+ <!-- Year -->
+ <RegExp dest="5+" input="$$1"
output="<year>\1</year>">
+ <expression><b>Ano:</b>
([0-9]*)</expression>
+ </RegExp>
+ <!-- Actor -->
+ <RegExp dest="8" input="$$9"
output="<actor><name>\1</name></actor>">
+ <RegExp dest="9" input="$$1" output="\1,">
+
<expression><b>Int.rpretes:</b><br
/>\s*([^\n\r]*)</expression>
+ </RegExp>
+ <expression clear="yes" repeat="yes"
trim="1">([^,]*),</expression>
+ </RegExp>
+ <RegExp dest="4" input="$$8"
output="<actors>\1</actors>">
+ <expression noclean="1"/>
+ </RegExp>
+ <RegExp dest="5+" input="$$8" conditional="ptgateonly"
output="\1">
+ <expression noclean="1"/>
+ </RegExp>
+ <!-- Director -->
+ <RegExp dest="8" input="$$9"
output="<director>\1</director>">
+ <RegExp dest="9" input="$$1" output="\1,">
+ <expression
trim="1"><b>Realiza..o:</b><br />\s*([^\n\r]*)</expression>
+ </RegExp>
+ <expression repeat="yes"
trim="1">([^,]+),</expression>
+ </RegExp>
+ <RegExp dest="4+" input="$$8"
output="<directors>\1</directors>">
+ <expression noclean="1"/>
+ </RegExp>
+ <RegExp dest="5+" input="$$8" conditional="ptgateonly"
output="\1">
+ <expression noclean="1"/>
+ </RegExp>
+ <!-- Add PTGate image as last Thumb -->
+ <RegExp dest="12" input="$$2"
output="<thumb>http://cinema.ptgate.pt/Movies/\1.jpg</thumb>">
+ <expression/>
+ </RegExp>
+ <RegExp dest="5+" input="$$12" conditional="ptgateonly"
output="\1">
+ <expression noclean="1"/>
+ </RegExp>
+ <!-- Add PT Distributor -->
+ <RegExp dest="13" input="$$1"
output="<studio>Dist: \1</studio>">
+ <expression><b>Distribuidora:</b>
([^<]*)</expression>
+ </RegExp>
+ <RegExp dest="5+" input="$$13" conditional="ptgateonly"
output="\1">
+ <expression noclean="1"/>
+ </RegExp>
+ <!-- IMDB Details -->
+ <RegExp dest="5+" input="$$10"
conditional="!ptgateonly" output="\1">
+ <!-- Use Google as last resort -->
+ <RegExp dest="10" input="$$8" output="<url
function="GetIMDBfromGoogle">http://www.google.com/search?q=site:imdb.com\1</url>">
+ <!-- search google for the original
title -->
+ <RegExp input="$$1" output="\1"
dest="7">
+ <expression
trim="1">\&#8250; ([^<]+)<br /></expression>
+ </RegExp>
+ <!-- add year to search string -->
+ <RegExp input="$$11" output="+\1"
dest="8">
+ <expression/>
+ </RegExp>
+ <!-- remove spaces and , -->
+ <RegExp input="$$7" output="+\1"
dest="8+">
+ <expression repeat="yes">([^
,]+)</expression>
+ </RegExp>
+ <expression/>
+ </RegExp>
+ <!-- use IMDB link on PTGATE, when available -->
+ <RegExp dest="10" input="$$9" output="<url
function="GetIMDBDetails">http://akas.imdb.com/title/\1/</url>">
+ <RegExp dest="9" input="$$1"
output="\1">
+ <expression
clear="yes">\.imdb\.com/title/(tt[0-9]*)</expression>
+ </RegExp>
+ <expression>(.+)</expression>
+ </RegExp>
+ <expression noclean="1"/>
+ </RegExp>
+ <expression noclean="1"/>
+ </RegExp>
+ </GetDetails>
+ <GetIMDBfromGoogle clearbuffers="no" dest="3">
+ <RegExp dest="3" input="$$5"
output="<details>\1</details>">
+ <RegExp dest="5" input="$$1" output="<url url
cache="tt\1-main.html"
function="GetIMDBDetails">http://akas.imdb.com/title/\1/</url>">
+
<expression>\.imdb\.com/title/(tt[0-9]*)</expression>
+ </RegExp>
+ <expression noclean="1"/>
+ </RegExp>
+ </GetIMDBfromGoogle>
+ <GetIMDBDetails clearbuffers="no" dest="3">
+ <RegExp dest="3" input="$$5"
output="<details>\1</details>">
+ <!-- IMDB Id -->
+ <RegExp input="$$1" dest="2" output="\1">
+ <expression>id=(tt[t0-9]*)</expression>
+ </RegExp>
+ <!-- Studio -->
+ <RegExp dest="5" input="$$1"
output="<studio>\1</studio>">
+ <expression
repeat="yes">"/company/[^>]+>([^<]+)</a></expression>
+ </RegExp>
+ <RegExp input="$$13" output="\1" dest="5+">
+ <expression noclean="1"/>
+ </RegExp>
+ <!-- Runtime -->
+ <RegExp dest="5+" input="$$1"
output="<runtime>\1</runtime>">
+ <expression
trim="1"><h4[^>]*?>Runtime:</h4>[^0-9]*([0-9]+)</expression>
+ </RegExp>
+ <!-- Rating -->
+ <RegExp dest="5+" input="$$1"
output="<rating>\1</rating><votes>\2</votes>">
+ <expression><span
class="rating-rating">([0-9.]+).*?>([0-9,]+) votes</a></expression>
+ </RegExp>
+ <!-- Actor -->
+ <RegExp dest="5+" input="$$2"
conditional="!fullcredits" output="<chain
function="GetIMDBCastById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Director -->
+ <RegExp dest="5+" conditional="!fullcredits"
output="<chain
function="GetIMDBDirectorsById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Credits -->
+ <RegExp dest="5+" conditional="!fullcredits"
output="<chain function="GetIMDBWritersById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Actor, full -->
+ <RegExp dest="5+" input="$$2" conditional="fullcredits"
output="<chain
function="GetIMDBFullCastById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Director, full -->
+ <RegExp dest="5+" input="$$2" conditional="fullcredits"
output="<chain
function="GetIMDBFullDirectorsById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Credits, full -->
+ <RegExp dest="5+" input="$$2" conditional="fullcredits"
output="<chain
function="GetIMDBFullWritersById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Thumb, IMPAwards -->
+ <RegExp dest="5+" input="$$2" conditional="impawards"
output="<chain function="GetIMPAThumbsById">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Poster, MoviePosterDB -->
+ <RegExp dest="5+" input="$$1"
conditional="movieposterdb" output="<chain
function="GetMoviePosterDBThumbs">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Trailer -->
+ <RegExp dest="5+" input="$$1" conditional="trailer"
output="<url
function="GetIMDBTrailer">http://akas.imdb.com/video/imdb/vi\1/player</url>">
+ <expression>/vi([0-9]*)/"</expression>
+ </RegExp>
+ <!-- Thumb, IMDB -->
+ <RegExp dest="5+" input="$$2" output="<chain
function="GetTMDBThumbsByIdChain">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <!-- Fanart -->
+ <RegExp dest="5+" input="$$2" conditional="fanart"
output="<chain
function="GetTMDBFanartByIdChain">$$2</chain>">
+ <expression/>
+ </RegExp>
+ <expression noclean="1"/>
+ </RegExp>
+ </GetIMDBDetails>
+</scraper>
-----------------------------------------------------------------------
Summary of changes:
metadata.ptgate.pt/addon.xml | 3 +-
metadata.ptgate.pt/ptgate.xml | 412 +++++++++++++++++++++--------------------
2 files changed, 211 insertions(+), 204 deletions(-)
hooks/post-receive
--
Scrapers
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons