diff options
author | peugeot <peugeot@psa.fr> | 2014-08-30 23:05:33 +0200 |
---|---|---|
committer | peugeot <peugeot@psa.fr> | 2014-08-30 23:05:33 +0200 |
commit | 9c4c233b846bd9be4c48b788d6d2347af764f15d (patch) | |
tree | ec559a75d0a20c472c41987611b5befd491d261f /youtube_dl/extractor/vporn.py | |
parent | 12c82cf9cb59e97186b96fea76a15b52a0a9bb37 (diff) |
Fix exception with n_views<1000
Diffstat (limited to 'youtube_dl/extractor/vporn.py')
-rw-r--r-- | youtube_dl/extractor/vporn.py | 6 |
1 files changed, 5 insertions, 1 deletions
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'<span>((?P<thousands>\d+),)?(?P<units>\d+) VIEWS</span>', 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, |