title refinement
This commit is contained in:
parent
3d8fb83063
commit
8cf1f86184
1 changed files with 5 additions and 3 deletions
|
@ -159,9 +159,9 @@ class IMDb:
|
||||||
html_title = str(html_title[0])
|
html_title = str(html_title[0])
|
||||||
title = stripTags(html_title)
|
title = stripTags(html_title)
|
||||||
title = re.sub('\(\d\d\d\d\)', '', title)
|
title = re.sub('\(\d\d\d\d\)', '', title)
|
||||||
title = re.sub('\(TV\)', '', title)
|
title = re.sub('\(\d\d\d\d\/I)', '', title)
|
||||||
title = re.sub('\(V\)', '', title)
|
for t in ('TV-Series', '(mini)', '(VG)', '(V)', '(TV)')
|
||||||
title = re.sub('\(VG\)', '', title)
|
title = title.replace(t, '')
|
||||||
return title.strip()
|
return title.strip()
|
||||||
|
|
||||||
def parseYear(self):
|
def parseYear(self):
|
||||||
|
@ -174,6 +174,8 @@ class IMDb:
|
||||||
if html_title:
|
if html_title:
|
||||||
html_title = str(html_title[0])
|
html_title = str(html_title[0])
|
||||||
year = re.compile('(\d\d\d\d)').findall(html_title)
|
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:
|
if year:
|
||||||
year = year[0]
|
year = year[0]
|
||||||
else: year = ''
|
else: year = ''
|
||||||
|
|
Loading…
Reference in a new issue