releasedate

This commit is contained in:
j 2011-10-28 19:24:09 +02:00
parent be28a4c625
commit b803c06dae

View file

@ -184,7 +184,7 @@ class Imdb(SiteParser):
're': '<div class="starbar-meta">.*?<b>([\d,.]+?)/10</b>', 're': '<div class="starbar-meta">.*?<b>([\d,.]+?)/10</b>',
'type': 'float' 'type': 'float'
}, },
'releaseDate': { 'releasedate': {
'page': 'releaseinfo', 'page': 'releaseinfo',
're': '<a href="/date/(\d{2})-(\d{2})/">.*?</a> <a href="/year/(\d{4})/">', 're': '<a href="/date/(\d{2})-(\d{2})/">.*?</a> <a href="/year/(\d{4})/">',
'type': 'date' 'type': 'date'
@ -385,9 +385,9 @@ class Imdb(SiteParser):
if 'budget' in self and 'gross' in self: if 'budget' in self and 'gross' in self:
self['profit'] = self['gross'] - self['budget'] self['profit'] = self['gross'] - self['budget']
if 'releaseDate' in self: if 'releasedate' in self:
if isinstance(self['releaseDate'], list): if isinstance(self['releasedate'], list):
self['releaseDate'] = min(self['releaseDate']) self['releasedate'] = min(self['releasedate'])
if 'summary' in self: if 'summary' in self:
self['summary'] = self['summary'].split('</p')[0].strip() self['summary'] = self['summary'].split('</p')[0].strip()