Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shawn Webb
youtube-dl
Commits
ea74e00b
Unverified
Commit
ea74e00b
authored
Sep 13, 2020
by
Daniel Peukert
Committed by
GitHub
Sep 13, 2020
Browse files
[youtube] Fix empty description extraction (#26575) (closes #26006)
parent
06cd4cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
youtube_dl/extractor/youtube.py
View file @
ea74e00b
...
...
@@ -1264,7 +1264,23 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'params'
:
{
'skip_download'
:
True
,
},
}
},
{
# empty description results in an empty string
'url'
:
'https://www.youtube.com/watch?v=x41yOUIvK2k'
,
'info_dict'
:
{
'id'
:
'x41yOUIvK2k'
,
'ext'
:
'mp4'
,
'title'
:
'IMG 3456'
,
'description'
:
''
,
'upload_date'
:
'20170613'
,
'uploader_id'
:
'ElevageOrVert'
,
'uploader'
:
'ElevageOrVert'
,
},
'params'
:
{
'skip_download'
:
True
,
},
},
]
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1931,7 +1947,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'''
,
replace_url
,
video_description
)
video_description
=
clean_html
(
video_description
)
else
:
video_description
=
video_details
.
get
(
'shortDescription'
)
or
self
.
_html_search_meta
(
'description'
,
video_webpage
)
video_description
=
video_details
.
get
(
'shortDescription'
)
if
video_description
is
None
:
video_description
=
self
.
_html_search_meta
(
'description'
,
video_webpage
)
if
not
smuggled_data
.
get
(
'force_singlefeed'
,
False
):
if
not
self
.
_downloader
.
params
.
get
(
'noplaylist'
):
...
...
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