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['year'] = html_title[0][1]
|
||||||
IMDbDict['title'] = stripTags(title).strip()
|
IMDbDict['title'] = stripTags(title).strip()
|
||||||
else:
|
else:
|
||||||
title = _getTerm(data, '<title>(.*?)</title>').split('(')
|
title = _getTerm(data, '<title>(.*?)</title>')
|
||||||
year = title[-1].split(')')[0].strip()
|
m = re.compile('\((\d+)\)').findall(title)
|
||||||
title = title[0].strip().decode('utf-8')
|
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['title'] = title
|
||||||
IMDbDict['year'] = year
|
IMDbDict['year'] = year
|
||||||
IMDbDict['title'] = htmldecode(IMDbDict['title'])
|
IMDbDict['title'] = htmldecode(IMDbDict['title'])
|
||||||
|
|
Loading…
Reference in a new issue