name->property

This commit is contained in:
j 2010-12-07 19:29:53 +01:00
parent 066bd38a01
commit 8b70307ec8

View file

@ -211,7 +211,7 @@ class Imdb(SiteParser):
}, },
'year': { 'year': {
'page': 'combined', 'page': 'combined',
're': '<meta name="og:title" content=".*?\((\d{4})\).*?"', 're': '="og:title" content=".*?\((\d{4})\).*?"',
'type': 'int' 'type': 'int'
} }
} }
@ -255,9 +255,11 @@ class Imdb(SiteParser):
self['title'] = "%s (S%02dE%02d) %s" % ( self['title'] = "%s (S%02dE%02d) %s" % (
self['series_title'], self['season'], self['episode'], self['episode_title']) self['series_title'], self['season'], self['episode'], self['episode_title'])
for key in ('directors', 'year'): for key in ('directors', 'year'):
if key in self:
self['episode_%s'%key] = self[key] self['episode_%s'%key] = self[key]
series = Imdb(self['series']) series = Imdb(self['series'])
for key in ['directors', 'year']: for key in ['directors', 'year']:
if key in series:
self[key] =series[key] self[key] =series[key]
else: else:
for key in ('series_title', 'episode_title', 'season', 'episode'): for key in ('series_title', 'episode_title', 'season', 'episode'):