projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12c82cf
)
Fix exception with n_views<1000
author
peugeot
<peugeot@psa.fr>
Sat, 30 Aug 2014 21:05:33 +0000
(23:05 +0200)
committer
peugeot
<peugeot@psa.fr>
Sat, 30 Aug 2014 21:05:33 +0000
(23:05 +0200)
youtube_dl/extractor/vporn.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vporn.py
b/youtube_dl/extractor/vporn.py
index 0d182b650779574e520f9f574ab108b7fa819cd4..645e935ecf3b46d66d7a5d16b93a1e42ec62bc8a 100644
(file)
--- 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,