summaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2014-09-10 18:24:57 +0700
committerSergey M․ <[email protected]>2014-09-10 18:24:57 +0700
commit2c5c1f48e9cec92e531af074276eca1f48b1f153 (patch)
tree4df974a93dbb23302ebf28e14c8caab89f6d7f86 /youtube_dl/extractor
parentd8e487fbd9c2abd5a85dedd8e83bb4f41779b225 (diff)
downloadyoutube-dl-2c5c1f48e9cec92e531af074276eca1f48b1f153.tar.gz
youtube-dl-2c5c1f48e9cec92e531af074276eca1f48b1f153.zip
[izlesene] Simplify
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/izlesene.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/izlesene.py b/youtube_dl/extractor/izlesene.py
index 17319e709..a83dd249f 100644
--- 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,
+ float_or_none,
str_to_int,
)
@@ -70,11 +71,9 @@ class IzleseneIE(InfoExtractor):
timestamp = parse_iso8601(self._html_search_meta(
'uploadDate', webpage, 'upload date', fatal=False))
- duration = int_or_none(self._html_search_regex(
+ duration = float_or_none(self._html_search_regex(
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(