projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d57b25
)
Fix exception with n_views<1000
author
peugeot
<peugeot@psa.fr>
Sat, 30 Aug 2014 21:03:37 +0000
(23:03 +0200)
committer
peugeot
<peugeot@psa.fr>
Sat, 30 Aug 2014 21:03:37 +0000
(23:03 +0200)
youtube_dl/extractor/eporner.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/eporner.py
b/youtube_dl/extractor/eporner.py
index 3071da6dbb9c3a4289102dd470785f45cd385d4e..72c3850b7331dee07b6ae16b121303b61ae21264 100644
(file)
--- 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,