diff --git a/scrapeit/imdb.py b/scrapeit/imdb.py
index 0b507cc..ad016e0 100644
--- a/scrapeit/imdb.py
+++ b/scrapeit/imdb.py
@@ -163,13 +163,17 @@ class IMDb:
if IMDbDict['title'][0] == '"' and IMDbDict['title'][-1] == '"':
IMDbDict['title'] = IMDbDict['title'][1:-1]
- #Votes
- m = re.compile('(.*?)/10 \((.*?) votes\)', re.IGNORECASE).search(data)
+ #Rating
+ m = re.compile('(.*?)/10', re.IGNORECASE).search(data)
if m:
IMDbDict['rating'] = int(float(m.group(1)) * 1000)
- IMDbDict['votes'] = int(m.group(2).replace(',', ''))
else:
IMDbDict['rating'] = -1
+ #Votes
+ m = re.compile('\((.*?) votes\)', re.IGNORECASE).search(data)
+ if m:
+ IMDbDict['votes'] = int(m.group(1).replace(',', ''))
+ else:
IMDbDict['votes'] = -1
data = data.replace('\n',' ')