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