Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Glen
youtube-dl
Commits
27019dbb
Verified
Commit
27019dbb
authored
Jul 12, 2019
by
Sergey M.
Browse files
[youtube] Fix is_live extraction (closes #21734)
parent
baf67a60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
youtube_dl/extractor/youtube.py
youtube_dl/extractor/youtube.py
+6
-0
No files found.
youtube_dl/extractor/youtube.py
View file @
27019dbb
...
...
@@ -27,6 +27,7 @@ from ..compat import (
compat_str
,
)
from
..utils
import
(
bool_or_none
,
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
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment