projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
baf67a6
)
[youtube] Fix is_live extraction (closes #21734)
author
Sergey M․
<dstftw@gmail.com>
Thu, 11 Jul 2019 20:45:58 +0000
(
03:45
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 11 Jul 2019 20:45:58 +0000
(
03:45
+0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 9f661a84f941cc13dd2e7d705f507ead8ef63d2e..8a3c502ba480b62b07bd447a76649437287826d0 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-27,6
+27,7
@@
from ..compat import (
compat_str,
)
from ..utils import (
compat_str,
)
from ..utils import (
+ bool_or_none,
clean_html,
dict_get,
error_to_compat_str,
clean_html,
dict_get,
error_to_compat_str,
@@
-1890,6
+1891,11
@@
class YoutubeIE(YoutubeBaseInfoExtractor):
if view_count is None and video_details:
view_count = int_or_none(video_details.get('viewCount'))
if view_count is None and video_details:
view_count = int_or_none(video_details.get('viewCount'))
+ if is_live is None:
+ is_live = bool_or_none(dict_get(
+ video_details, ('isLive', 'isLiveContent'),
+ skip_false_values=False))
+
# Check for "rental" videos
if 'ypc_video_rental_bar_text' in video_info and 'author' not in video_info:
raise ExtractorError('"rental" videos not supported. See https://github.com/ytdl-org/youtube-dl/issues/359 for more information.', expected=True)
# Check for "rental" videos
if 'ypc_video_rental_bar_text' in video_info and 'author' not in video_info:
raise ExtractorError('"rental" videos not supported. See https://github.com/ytdl-org/youtube-dl/issues/359 for more information.', expected=True)