The API is an independient piece of code which you could use for your project or use interactively. For example
>>> from cuevanalib import cuevanaapi
>>> api = cuevanaapi.CuevanaAPI ()
>>> house = api.get_show ('house')
>>> house.plot
u'El doctor Gregory House, especialista en el tratamiento de enfermedades infecciosas, trabaja en un hospital universitario de Princetown, donde dirige una unidad especial encargada de pacientes afectados por dolencias extrañas y en la que colabora con un selecto grupo de aventajados ayudantes.'
>>> house7x1 = house.get_episode (7, 1)
>>> house7x1.title
'Now What?'
>>> house7x1.cast
['Hugh Laurie',
'Lisa Edelstein',
'Omar Epps',
'Jesse Spencer',
'Jennifer Morrison',
'Robert Sean Leonard',
'Olivia Wilde',
'Peter Jacobson']
>>> house7x1.sources
['http://www.megaupload.com/?d=DM58TA0J',
'http://www.filesonic.com/file/36841721/?',
'http://bitshare.com/?f=67z435xm',
'http://www.filefactory.com/file/caf85b9']
>>> house7x1.subs
{'ES': 'http://www.cuevana.tv/download_sub?file=s/sub/7888_ES.srt'}
A lib trying to work as Cuevana missing API
A movie/episode base class.
Return sources in as a formatted string
return a pickled representation with a hash appended
Returns a list of links to the content
A dictionary of urls to subtitles in .srt format with two letter uppercase code language as keys.
>>> print self.subs.keys()
('ES', 'EN')
Main class. The fun starts here
Retrieve a show object by its title. If any show match title, returns None
Returns and object (Movie, Episode or Show), from a pickled string representation with checksum appended.
Use as the restore function of Content.get_pickle() and Show.get_pickle()
pickled – A pickled dumps with sha1 checksum appended
Returns: | Movie, episode or Episode |
---|---|
Raises : | :exc:ValueError – if hash not match |
Returns a list of last movies published, extrated from RSS feed
Returns a list of last show episodes published, extrated from RSS feed
Search content using cuevana’s search engine
q – the query string cat – type of search. Valid values are’title’ (default),
‘episode’, ‘actor’ or ‘director’
Show episode class
Should be instantiated via dispatch()
Return the number of episode
Return a formatted string valid as filename to a renaming process
format could be ‘long’ or ‘short’
Return the next episode.
If it’s the last episode of the season returns the first one of the next season. If it’s the last episode available return None
return a the title and other info in a pretty way
New in version 0.2.
Return the previous episode in the season
If it’s the first episode of a season returns the last one of the previous season. If it’s the first episode available return None
The season to which this episode belongs
Returns: | int |
---|
Return the title of the show
return the Show() object to wich this episode belongs
return the url to a thumbnail of the box cover
Movie class.
Should be instanciated via dispatch()
return a string valid as filename to a renaming process
format could be ‘long’ or ‘short’
return a the title and other info in a pretty way
return the url to a thumbnail of the box cover
New in version 0.2.
Show class
It’s a container of episodes.
casting list, (in general) orderer by relevance
director/s list, (in general) orderer by relevance
Return one specific episode.
Valid parameter/s:
get_episode(‘s01e10’) get_episode(‘1x10’) get_episode(1, 10)
Deprecated since version 0.4: Use get_episodes() instead.
Return a list between both limits including them Example ‘s01e10’ - ‘s02e11’
If start has just one number, first episode is asummed If end has just number, last episode is asummed
New in version 0.4.
return a pickled representation with a hash appendend
Return a list of Episodes of the given season
Valid parameter:
get_season(‘s01’) get_season(‘temp1’) get_season(1)
a short sinopsys of the show plot
A list of episode lists [[ep1x1, ...], [ep2x1..], ..]
Deprecated since version 0.6: Use get_season() instead.
Title of the show
URL to this show. Sometimes this page is empty (a cuevana know bug)
A dispatcher function that return the right object based on its URL
Optional keyword arguments: title and/or year