From: peugeot Date: Sat, 30 Aug 2014 21:03:37 +0000 (+0200) Subject: Fix exception with n_views<1000 X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=8a6c59865d2ab6e69792488567f993096f8f7695;p=youtube-dl Fix exception with n_views<1000 --- diff --git a/youtube_dl/extractor/eporner.py b/youtube_dl/extractor/eporner.py index 3071da6db..72c3850b7 100644 --- a/youtube_dl/extractor/eporner.py +++ b/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 mobj = re.search(r'id="cinemaviews">((?P\d+),)?(?P\d+)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 { 'id': video_id,