aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/eporner.py
diff options
context:
space:
mode:
authorpeugeot <peugeot@psa.fr>2014-08-30 23:03:37 +0200
committerpeugeot <peugeot@psa.fr>2014-08-30 23:03:37 +0200
commit8a6c59865d2ab6e69792488567f993096f8f7695 (patch)
treecc954470cd659eebe1c19275a04a2db280ddab02 /youtube_dl/extractor/eporner.py
parent1d57b2520c66908a4e21640b5105e16fd4d4e374 (diff)
Fix exception with n_views<1000
Diffstat (limited to 'youtube_dl/extractor/eporner.py')
-rw-r--r--youtube_dl/extractor/eporner.py6
1 files changed, 5 insertions, 1 deletions
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<thousands>\d+),)?(?P<units>\d+)<small>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,