X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fizlesene.py;h=a83dd249f6cd5694884158de6471802df6fe2d01;hb=532f5bff70cc32f54f38fbce9233a88faf4423b9;hp=f0953c545110f1aef7068a9d41e0875b42263ed4;hpb=f1d15e6dbc194309a970174461799e1d9e7cf9a1;p=youtube-dl.git diff --git a/youtube_dl/extractor/izlesene.py b/youtube_dl/extractor/izlesene.py index f0953c545..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, ) @@ -18,7 +19,6 @@ class IzleseneIE(InfoExtractor): https?://(?:(?:www|m)\.)?izlesene\.com/ (?:video|embedplayer)/(?:[^/]+/)?(?P[0-9]+) ''' - _STREAM_URL = 'http://panel.izlesene.com/api/streamurl/{id:}/{format:}' _TESTS = [ { 'url': 'http://www.izlesene.com/video/sevincten-cildirtan-dogum-gunu-hediyesi/7599694', @@ -71,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(