projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[gorillavid] Add check for non existing videos
[youtube-dl]
/
youtube_dl
/
extractor
/
izlesene.py
diff --git
a/youtube_dl/extractor/izlesene.py
b/youtube_dl/extractor/izlesene.py
index f0953c545110f1aef7068a9d41e0875b42263ed4..07ef682ee38052088d07f3f232c245ded77b2193 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,
)
@@
-18,7
+19,6
@@
class IzleseneIE(InfoExtractor):
https?://(?:(?:www|m)\.)?izlesene\.com/
(?:video|embedplayer)/(?:[^/]+/)?(?P<id>[0-9]+)
'''
https?://(?:(?:www|m)\.)?izlesene\.com/
(?:video|embedplayer)/(?:[^/]+/)?(?P<id>[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',
_TESTS = [
{
'url': 'http://www.izlesene.com/video/sevincten-cildirtan-dogum-gunu-hediyesi/7599694',
@@
-63,7
+63,8
@@
class IzleseneIE(InfoExtractor):
title = self._og_search_title(webpage)
description = self._og_search_description(webpage)
title = self._og_search_title(webpage)
description = self._og_search_description(webpage)
- thumbnail = self._og_search_thumbnail(webpage)
+ thumbnail = self._proto_relative_url(
+ self._og_search_thumbnail(webpage), scheme='http:')
uploader = self._html_search_regex(
r"adduserUsername\s*=\s*'([^']+)';",
uploader = self._html_search_regex(
r"adduserUsername\s*=\s*'([^']+)';",
@@
-71,11
+72,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(