title refinement

This commit is contained in:
j 2007-06-28 11:00:12 +00:00
parent 3d8fb83063
commit 8cf1f86184
1 changed files with 5 additions and 3 deletions

View File

@ -159,9 +159,9 @@ class IMDb:
html_title = str(html_title[0])
title = stripTags(html_title)
title = re.sub('\(\d\d\d\d\)', '', title)
title = re.sub('\(TV\)', '', title)
title = re.sub('\(V\)', '', title)
title = re.sub('\(VG\)', '', title)
title = re.sub('\(\d\d\d\d\/I)', '', title)
for t in ('TV-Series', '(mini)', '(VG)', '(V)', '(TV)')
title = title.replace(t, '')
return title.strip()
def parseYear(self):
@ -174,6 +174,8 @@ class IMDb:
if html_title:
html_title = str(html_title[0])
year = re.compile('(\d\d\d\d)').findall(html_title)
if not year:
year = re.compile('(\d\d\d\d/I)').findall(html_title)
if year:
year = year[0]
else: year = ''