[imdb] dates protection activated
This commit is contained in:
parent
205ffd0251
commit
0a91eec783
1 changed files with 2 additions and 6 deletions
|
|
@ -163,12 +163,8 @@ class PersonPage(BasePage):
|
|||
dtimes = self.parser.select(td_overview,'time[itemprop=deathDate]')
|
||||
if len(dtimes) > 0:
|
||||
dtime = dtimes[0].attrib.get('datetime','').split('-')
|
||||
if len(dtime) == 2:
|
||||
dtime.append('1')
|
||||
elif len(dtime) == 1:
|
||||
dtime.append('1')
|
||||
dtime.append('1')
|
||||
death_date = datetime(int(dtime[0]),int(dtime[1]),int(dtime[2]))
|
||||
if len(dtime) == 3 and int(dtime[0]) >= 1900:
|
||||
death_date = datetime(int(dtime[0]),int(dtime[1]),int(dtime[2]))
|
||||
img_thumbnail = self.parser.select(self.document.getroot(),'td#img_primary img')
|
||||
if len(img_thumbnail) > 0:
|
||||
thumbnail_url = unicode(img_thumbnail[0].attrib.get('src',''))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue