From: peugeot Date: Sat, 30 Aug 2014 21:05:33 +0000 (+0200) Subject: Fix exception with n_views<1000 X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=9c4c233b846bd9be4c48b788d6d2347af764f15d;p=youtube-dl Fix exception with n_views<1000 --- diff --git a/youtube_dl/extractor/vporn.py b/youtube_dl/extractor/vporn.py index 0d182b650..645e935ec 100644 --- a/youtube_dl/extractor/vporn.py +++ b/youtube_dl/extractor/vporn.py @@ -35,7 +35,11 @@ class VpornIE(InfoExtractor): duration = int(mobj.group('minutes')) * 60 + int(mobj.group('seconds')) if mobj else None mobj = re.search(r'((?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,