From 8a6c59865d2ab6e69792488567f993096f8f7695 Mon Sep 17 00:00:00 2001 From: peugeot Date: Sat, 30 Aug 2014 23:03:37 +0200 Subject: [PATCH] Fix exception with n_views<1000 --- youtube_dl/extractor/eporner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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, -- 2.22.2