Permalink
Browse files

Correct MovieGetInfo to make search By ID

* Add test file for movie scrap
  • Loading branch information...
1 parent bd5158d commit d768fc261e13f86c1080a731923fc73a0520faa7 @nledez committed Sep 7, 2010
Showing with 142 additions and 3 deletions.
  1. +4 −0 History.txt
  2. +3 −3 lib/cine_passion.rb
  3. +135 −0 test/data/exploded/cinepassion-scraper-test-03-by-id.xml
View
@@ -44,3 +44,7 @@
* version() return library version
* Better MovieGetInfo() (Work now)
+
+=== 0.10.2 / 2010-09-07
+
+* Correct MovieGetInfo to make search By ID
View
@@ -20,7 +20,7 @@
class CinePassion
attr_reader :xml_data, :movies_info, :result_nb, :status, :quota, :apikey, :siteurl, :proxyinfo, :lang
- VERSION = '0.10.0'
+ VERSION = '0.10.2'
def version()
return VERSION
@@ -105,13 +105,13 @@ def GenerateURLMovieGetInfo(search, query="ID", format="XML")
# Execute a MovieSearch on scraper
def MovieSearch(search, query="Title", format="XML")
- DataLoadFromSite(GenerateURLMovieSearch(search, query="Title", format="XML"))
+ DataLoadFromSite(GenerateURLMovieSearch(search, query=query, format=format))
@xml_data
end
# Execute a MovieGetInfo on scraper
def MovieGetInfo(search, query="ID", format="XML")
- DataLoadFromSite(GenerateURLMovieSearch(search, query="Title", format="XML"))
+ DataLoadFromSite(GenerateURLMovieGetInfo(search, query=query, format=format))
@xml_data
end
@@ -0,0 +1,135 @@
+<movie>
+ <quota use="3" authorize="600" reset_date="2010-09-07 21:27:46"/>
+ <id>136356</id>
+ <id_allocine>136356</id_allocine>
+ <id_imdb>1234548</id_imdb>
+ <last_change>1279466676</last_change>
+ <url>http://passion-xbmc.org/scraper/index2.php?Page=ViewMovie&ID=136356</url>
+ <title>Les Chèvres du Pentagone</title>
+ <originaltitle>The Men Who Stare at Goats</originaltitle>
+ <year>2009</year>
+ <directors>
+ <director>Grant Heslov</director>
+ </directors>
+ <plot>Bob Wilton, un journaliste désespéré fait l'heureuse rencontre de Lyn Cassady, un soldat aux pouvoirs paranormaux combattant le terrorisme. Ils se rendent ensemble en Irak ou ils rencontrent Bill Django, le fondateur de l'unité, et Larry Hooper, soldat de l'unité qui dirige une prison.</plot>
+ <tagline>(...) un casting de rêve pour une comédie dont l'insolence revigorante et l'absurdité assumée rappellent le récent Burn after reading des frères Coen. Jubilatoire</tagline>
+ <runtime>90</runtime>
+ <information>Couleur / Format de projection : 2.35 : 1 Cinemascope / Format de production : 35 mm</information>
+ <trailers>
+ <trailer>http://hd.fr.mediaplayer.allocine.fr/nmedia/18/73/11/43/18937641_fa2_vost_hd.flv</trailer>
+ </trailers>
+ <countries>
+ <country>américain</country>
+ </countries>
+ <genres>
+ <genre>Comédie</genre>
+ </genres>
+ <studios>
+ <studio>Sony Pictures Releasing</studio>
+ </studios>
+ <credits>
+ <credit>Peter Straughan</credit>
+ </credits>
+ <images>
+ <image id="311335" type="Poster" size="original" width="2000" height="2716" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-311335.jpg"/>
+ <image id="311335" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-311335.jpg"/>
+ <image id="311335" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-311335.jpg"/>
+ <image id="316688" type="Poster" size="original" width="1383" height="2048" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-316688.jpg"/>
+ <image id="316688" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-316688.jpg"/>
+ <image id="316688" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-316688.jpg"/>
+ <image id="316689" type="Poster" size="original" width="1000" height="1478" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-316689.jpg"/>
+ <image id="316689" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-316689.jpg"/>
+ <image id="316689" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-316689.jpg"/>
+ <image id="316690" type="Poster" size="original" width="760" height="950" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-316690.jpg"/>
+ <image id="316690" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-316690.jpg"/>
+ <image id="316690" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-316690.jpg"/>
+ <image id="316691" type="Poster" size="original" width="760" height="950" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-316691.jpg"/>
+ <image id="316691" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-316691.jpg"/>
+ <image id="316691" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-316691.jpg"/>
+ <image id="316692" type="Poster" size="original" width="600" height="820" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-316692.jpg"/>
+ <image id="316692" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-316692.jpg"/>
+ <image id="316692" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-316692.jpg"/>
+ <image id="316693" type="Poster" size="original" width="600" height="800" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-316693.jpg"/>
+ <image id="316693" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-316693.jpg"/>
+ <image id="316693" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-316693.jpg"/>
+ <image id="286084" type="Poster" size="original" width="600" height="800" url="http://passion-xbmc.org/scraper/Gallery/main/Poster_LesChvresduPentagone-286084.peg"/>
+ <image id="286084" type="Poster" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Poster_LesChvresduPentagone-286084.peg"/>
+ <image id="286084" type="Poster" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Poster_LesChvresduPentagone-286084.peg"/>
+ <image id="311338" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-311338.jpg"/>
+ <image id="311338" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-311338.jpg"/>
+ <image id="311338" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-311338.jpg"/>
+ <image id="316668" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316668.jpg"/>
+ <image id="316668" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316668.jpg"/>
+ <image id="316668" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316668.jpg"/>
+ <image id="316671" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316671.jpg"/>
+ <image id="316671" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316671.jpg"/>
+ <image id="316671" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316671.jpg"/>
+ <image id="311339" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-311339.jpg"/>
+ <image id="311339" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-311339.jpg"/>
+ <image id="311339" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-311339.jpg"/>
+ <image id="311334" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-311334.jpg"/>
+ <image id="311334" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-311334.jpg"/>
+ <image id="311334" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-311334.jpg"/>
+ <image id="316670" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316670.jpg"/>
+ <image id="316670" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316670.jpg"/>
+ <image id="316670" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316670.jpg"/>
+ <image id="311340" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-311340.jpg"/>
+ <image id="311340" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-311340.jpg"/>
+ <image id="311340" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-311340.jpg"/>
+ <image id="311336" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-311336.jpg"/>
+ <image id="311336" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-311336.jpg"/>
+ <image id="311336" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-311336.jpg"/>
+ <image id="286085" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-286085.peg"/>
+ <image id="286085" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-286085.peg"/>
+ <image id="286085" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-286085.peg"/>
+ <image id="311337" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-311337.jpg"/>
+ <image id="311337" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-311337.jpg"/>
+ <image id="311337" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-311337.jpg"/>
+ <image id="316669" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316669.jpg"/>
+ <image id="316669" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316669.jpg"/>
+ <image id="316669" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316669.jpg"/>
+ <image id="316672" type="Fanart" size="original" width="1920" height="1080" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316672.jpg"/>
+ <image id="316672" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316672.jpg"/>
+ <image id="316672" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316672.jpg"/>
+ <image id="316682" type="Fanart" size="original" width="760" height="506" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316682.jpg"/>
+ <image id="316682" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316682.jpg"/>
+ <image id="316682" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316682.jpg"/>
+ <image id="316675" type="Fanart" size="original" width="760" height="506" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316675.jpg"/>
+ <image id="316675" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316675.jpg"/>
+ <image id="316675" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316675.jpg"/>
+ <image id="316674" type="Fanart" size="original" width="760" height="506" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316674.jpg"/>
+ <image id="316674" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316674.jpg"/>
+ <image id="316674" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316674.jpg"/>
+ <image id="316673" type="Fanart" size="original" width="760" height="506" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316673.jpg"/>
+ <image id="316673" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316673.jpg"/>
+ <image id="316673" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316673.jpg"/>
+ <image id="316687" type="Fanart" size="original" width="600" height="400" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316687.jpg"/>
+ <image id="316687" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316687.jpg"/>
+ <image id="316687" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316687.jpg"/>
+ <image id="316684" type="Fanart" size="original" width="600" height="400" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316684.jpg"/>
+ <image id="316684" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316684.jpg"/>
+ <image id="316684" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316684.jpg"/>
+ <image id="316685" type="Fanart" size="original" width="600" height="400" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316685.jpg"/>
+ <image id="316685" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316685.jpg"/>
+ <image id="316685" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316685.jpg"/>
+ <image id="316686" type="Fanart" size="original" width="600" height="400" url="http://passion-xbmc.org/scraper/Gallery/main/Fanart_LesChvresduPentagone-316686.jpg"/>
+ <image id="316686" type="Fanart" size="preview" url="http://passion-xbmc.org/scraper/Gallery/preview/Fanart_LesChvresduPentagone-316686.jpg"/>
+ <image id="316686" type="Fanart" size="thumb" url="http://passion-xbmc.org/scraper/Gallery/thumb/Fanart_LesChvresduPentagone-316686.jpg"/>
+ </images>
+ <ratings>
+ <rating type="allocine" votes="1603">2,5</rating>
+ <rating type="imdb" votes="33172">6,4</rating>
+ <rating type="cinepassion" votes="1">7</rating>
+ </ratings>
+ <casting>
+ <person id="32799" name="J.K. Simmons" character="le général Putkin" idthumb="32423" thumb="http://passion-xbmc.org/scraper/Gallery/main/JKSimmons-32423.jpg"/>
+ <person id="111326" name="Tim Griffin" character="Tim Kootz" idthumb="0" thumb="http://passion-xbmc.org/scraper/Images/Actor_Unknow.png"/>
+ <person id="103366" name="Nick Offerman" character="Scotty Mercer" idthumb="0" thumb="http://passion-xbmc.org/scraper/Images/Actor_Unknow.png"/>
+ <person id="6407" name="Stephen Lang" character="le général Hopgood" idthumb="50691" thumb="http://passion-xbmc.org/scraper/Gallery/main/StephenLang-50691.jpg"/>
+ <person id="12399" name="Kevin Spacey" character="Larry Hooper" idthumb="32271" thumb="http://passion-xbmc.org/scraper/Gallery/main/KevinSpacey-32271.jpg"/>
+ <person id="1052" name="Jeff Bridges" character="Bill Django" idthumb="31026" thumb="http://passion-xbmc.org/scraper/Gallery/main/JeffBridges-31026.jpg"/>
+ <person id="17043" name="Ewan McGregor" character="Bob Wilton" idthumb="31599" thumb="http://passion-xbmc.org/scraper/Gallery/main/EwanMcGregor-31599.jpg"/>
+ <person id="6298" name="Robert Patrick" character="Todd Nixon" idthumb="31401" thumb="http://passion-xbmc.org/scraper/Gallery/main/RobertPatrick-31401.jpg"/>
+ <person id="10551" name="Stephen Root" character="Gus Lacey" idthumb="0" thumb="http://passion-xbmc.org/scraper/Images/Actor_Unknow.png"/>
+ </casting>
+</movie>

0 comments on commit d768fc2

Please sign in to comment.