This commit is contained in:
j 2007-04-12 12:57:46 +00:00
parent 0f738495f7
commit 84dc6241c0

View file

@ -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'])