projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d8e487f
)
[izlesene] Simplify
author
Sergey M․
<dstftw@gmail.com>
Wed, 10 Sep 2014 11:24:57 +0000
(18:24 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 10 Sep 2014 11:24:57 +0000
(18:24 +0700)
youtube_dl/extractor/izlesene.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/izlesene.py
b/youtube_dl/extractor/izlesene.py
index 17319e7097f97f84358bb6faf95ff4ee350c46e0..a83dd249f6cd5694884158de6471802df6fe2d01 100644
(file)
--- a/
youtube_dl/extractor/izlesene.py
+++ b/
youtube_dl/extractor/izlesene.py
@@
-9,6
+9,7
@@
from ..utils import (
parse_iso8601,
determine_ext,
int_or_none,
parse_iso8601,
determine_ext,
int_or_none,
+ float_or_none,
str_to_int,
)
str_to_int,
)
@@
-70,11
+71,9
@@
class IzleseneIE(InfoExtractor):
timestamp = parse_iso8601(self._html_search_meta(
'uploadDate', webpage, 'upload date', fatal=False))
timestamp = parse_iso8601(self._html_search_meta(
'uploadDate', webpage, 'upload date', fatal=False))
- duration =
in
t_or_none(self._html_search_regex(
+ duration =
floa
t_or_none(self._html_search_regex(
r'"videoduration"\s*:\s*"([^"]+)"',
r'"videoduration"\s*:\s*"([^"]+)"',
- webpage, 'duration', fatal=False))
- if duration:
- duration /= 1000.0
+ webpage, 'duration', fatal=False), scale=1000)
view_count = str_to_int(get_element_by_id('videoViewCount', webpage))
comment_count = self._html_search_regex(
view_count = str_to_int(get_element_by_id('videoViewCount', webpage))
comment_count = self._html_search_regex(