mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-22 15:57:23 +00:00
[izlesene] Simplify
This commit is contained in:
parent
d8e487fbd9
commit
2c5c1f48e9
1 changed files with 3 additions and 4 deletions
|
@ -9,6 +9,7 @@ from ..utils import (
|
||||||
parse_iso8601,
|
parse_iso8601,
|
||||||
determine_ext,
|
determine_ext,
|
||||||
int_or_none,
|
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(
|
timestamp = parse_iso8601(self._html_search_meta(
|
||||||
'uploadDate', webpage, 'upload date', fatal=False))
|
'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*"([^"]+)"',
|
r'"videoduration"\s*:\s*"([^"]+)"',
|
||||||
webpage, 'duration', fatal=False))
|
webpage, 'duration', fatal=False), scale=1000)
|
||||||
if duration:
|
|
||||||
duration /= 1000.0
|
|
||||||
|
|
||||||
view_count = str_to_int(get_element_by_id('videoViewCount', webpage))
|
view_count = str_to_int(get_element_by_id('videoViewCount', webpage))
|
||||||
comment_count = self._html_search_regex(
|
comment_count = self._html_search_regex(
|
||||||
|
|
Loading…
Reference in a new issue