parse year not any 4 digit number in title
This commit is contained in:
parent
93f21420ba
commit
c941b9877d
1 changed files with 3 additions and 2 deletions
|
@ -176,9 +176,10 @@ class IMDb:
|
|||
html_title = soup('title')
|
||||
if html_title:
|
||||
html_title = str(html_title[0])
|
||||
year = re.compile('(\d\d\d\d)').findall(html_title)
|
||||
html_title = stripTags(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)
|
||||
year = re.compile('\((\d\d\d\d/I)\)').findall(html_title)
|
||||
if year:
|
||||
year = year[0]
|
||||
else: year = ''
|
||||
|
|
Loading…
Reference in a new issue