projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d54062
)
[youtube:live] Improve live detection (closes #15365)
author
Sergey M․
<dstftw@gmail.com>
Sat, 20 Jan 2018 10:57:20 +0000
(17:57 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 20 Jan 2018 10:57:20 +0000
(17:57 +0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index a01ec1436ebbdd2eb8bdfe0d27306cf72bda3af5..f698a5627bb552ffa3383e03044af698d592bbb2 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-2530,10
+2530,11
@@
class YoutubeLiveIE(YoutubeBaseInfoExtractor):
webpage = self._download_webpage(url, channel_id, fatal=False)
if webpage:
page_type = self._og_search_property(
webpage = self._download_webpage(url, channel_id, fatal=False)
if webpage:
page_type = self._og_search_property(
- 'type', webpage, 'page type', default=
None
)
+ 'type', webpage, 'page type', default=
''
)
video_id = self._html_search_meta(
'videoId', webpage, 'video id', default=None)
video_id = self._html_search_meta(
'videoId', webpage, 'video id', default=None)
- if page_type == 'video' and video_id and re.match(r'^[0-9A-Za-z_-]{11}$', video_id):
+ if page_type.startswith('video') and video_id and re.match(
+ r'^[0-9A-Za-z_-]{11}$', video_id):
return self.url_result(video_id, YoutubeIE.ie_key())
return self.url_result(base_url)
return self.url_result(video_id, YoutubeIE.ie_key())
return self.url_result(base_url)