[cineoob] new command : biography
This commit is contained in:
parent
393800e7fd
commit
27c36d412b
5 changed files with 67 additions and 17 deletions
|
|
@ -23,7 +23,7 @@ from weboob.capabilities.base import NotAvailable
|
|||
from weboob.capabilities.cinema import Movie
|
||||
from weboob.tools.json import json
|
||||
|
||||
from .pages import MoviePage, PersonPage, MovieCrewPage
|
||||
from .pages import MoviePage, PersonPage, MovieCrewPage, BiographyPage
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
|
|
@ -38,7 +38,8 @@ class ImdbBrowser(BaseBrowser):
|
|||
PAGES = {
|
||||
'http://www.imdb.com/title/tt[0-9]*/*': MoviePage,
|
||||
'http://www.imdb.com/title/tt[0-9]*/fullcredits.*': MovieCrewPage,
|
||||
'http://www.imdb.com/name/nm.*': PersonPage,
|
||||
'http://www.imdb.com/name/nm[0-9]*/*': PersonPage,
|
||||
'http://www.imdb.com/name/nm[0-9]*/bio.*': BiographyPage,
|
||||
}
|
||||
|
||||
def iter_movies(self, pattern):
|
||||
|
|
@ -121,6 +122,11 @@ class ImdbBrowser(BaseBrowser):
|
|||
assert self.is_on_page(PersonPage)
|
||||
return self.page.get_person(id)
|
||||
|
||||
def get_person_biography(self, id):
|
||||
self.location('http://www.imdb.com/name/%s/bio' % id)
|
||||
assert self.is_on_page(BiographyPage)
|
||||
return self.page.get_biography()
|
||||
|
||||
def iter_movie_persons(self, movie_id):
|
||||
self.location('http://www.imdb.com/title/%s' % movie_id)
|
||||
assert self.is_on_page(MoviePage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue