aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorpeugeot <peugeot@psa.fr>2014-08-30 23:05:33 +0200
committerpeugeot <peugeot@psa.fr>2014-08-30 23:05:33 +0200
commit9c4c233b846bd9be4c48b788d6d2347af764f15d (patch)
treeec559a75d0a20c472c41987611b5befd491d261f /youtube_dl/extractor
parent12c82cf9cb59e97186b96fea76a15b52a0a9bb37 (diff)
Fix exception with n_views<1000
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/vporn.py6
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,