years
This commit is contained in:
parent
0f738495f7
commit
84dc6241c0
1 changed files with 7 additions and 3 deletions
|
@ -164,9 +164,13 @@ class IMDb:
|
|||
IMDbDict['year'] = html_title[0][1]
|
||||
IMDbDict['title'] = stripTags(title).strip()
|
||||
else:
|
||||
title = _getTerm(data, '<title>(.*?)</title>').split('(')
|
||||
year = title[-1].split(')')[0].strip()
|
||||
title = title[0].strip().decode('utf-8')
|
||||
title = _getTerm(data, '<title>(.*?)</title>')
|
||||
m = re.compile('\((\d+)\)').findall(title)
|
||||
if m:
|
||||
year = m[0]
|
||||
else:
|
||||
year = title.split('(')[-1].split(')')[0].strip()
|
||||
title = title.split('(')[0].strip().decode('utf-8')
|
||||
IMDbDict['title'] = title
|
||||
IMDbDict['year'] = year
|
||||
IMDbDict['title'] = htmldecode(IMDbDict['title'])
|
||||
|
|
Loading…
Reference in a new issue