Browse Source

Fix exception with n_views<1000

peugeot 11 years ago
parent
commit
8a6c59865d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      youtube_dl/extractor/eporner.py

+ 5 - 1
youtube_dl/extractor/eporner.py

@@ -34,7 +34,11 @@ class EpornerIE(InfoExtractor):
         duration = int(mobj.group('minutes')) * 60 + int(mobj.group('seconds')) if mobj else None
         duration = int(mobj.group('minutes')) * 60 + int(mobj.group('seconds')) if mobj else None
 
 
         mobj = re.search(r'id="cinemaviews">((?P<thousands>\d+),)?(?P<units>\d+)<small>views', webpage)
         mobj = re.search(r'id="cinemaviews">((?P<thousands>\d+),)?(?P<units>\d+)<small>views', webpage)
-        view_count = int(mobj.group('thousands')) * 1000 + int(mobj.group('units')) if mobj else None
+        try:
+            view_count = int(mobj.group('units'))
+            view_count += int(mobj.group('thousands')) * 1000
+        except:
+            pass
 
 
         return {
         return {
             'id': video_id,
             'id': video_id,