[cineoob] get_object cleaning
This commit is contained in:
parent
b9d3719ad2
commit
c3c0561887
4 changed files with 18 additions and 28 deletions
|
|
@ -104,6 +104,10 @@ class ImdbBackend(BaseBackend, ICapCinema):
|
|||
movie.note = mov.note
|
||||
movie.roles = mov.roles
|
||||
movie.short_description= mov.short_description
|
||||
|
||||
if 'all_release_dates' in fields:
|
||||
movie.all_release_dates = self.get_movie_releases(movie.id)
|
||||
|
||||
return movie
|
||||
|
||||
OBJECTS = {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ class ImdbBrowser(BaseBrowser):
|
|||
movie.country = NotLoaded
|
||||
movie.note = NotLoaded
|
||||
movie.roles = NotLoaded
|
||||
movie.all_release_dates= NotLoaded
|
||||
yield movie
|
||||
|
||||
def iter_persons(self, pattern):
|
||||
|
|
@ -149,6 +150,7 @@ class ImdbBrowser(BaseBrowser):
|
|||
movie.note = note
|
||||
movie.roles = roles
|
||||
movie.short_description= short_description
|
||||
movie.all_release_dates= NotLoaded
|
||||
return movie
|
||||
|
||||
def get_person(self, id):
|
||||
|
|
|
|||
|
|
@ -41,12 +41,17 @@ class ReleasePage(BasePage):
|
|||
country = a.text
|
||||
td_date = self.parser.select(a.getparent().getparent().getparent(),'td')[1]
|
||||
date_links = self.parser.select(td_date,'a')
|
||||
date = date_links[1].attrib.get('href','').strip('/').split('/')[-1]
|
||||
date += '-'+date_links[0].attrib.get('href','').strip('/').split('/')[-1]
|
||||
if len(date_links) > 1:
|
||||
date = date_links[1].attrib.get('href','').strip('/').split('/')[-1]
|
||||
date += '-'+date_links[0].attrib.get('href','').strip('/').split('/')[-1]
|
||||
else:
|
||||
date = unicode(self.parser.select(a.getparent().getparent().getparent(),'td')[1].text_content())
|
||||
result += '%s : %s\n' % (country,date)
|
||||
if result == u'':
|
||||
result = NotAvailable
|
||||
return result.strip()
|
||||
else:
|
||||
result = result.strip()
|
||||
return result
|
||||
|
||||
|
||||
class BiographyPage(BasePage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue