mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-20 20:14:24 +00:00
[extractor/common] Add description to playlist_result
This commit is contained in:
parent
8d1c8cae9c
commit
acf5cbfe93
@ -439,7 +439,7 @@ class InfoExtractor(object):
|
|||||||
return video_info
|
return video_info
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def playlist_result(entries, playlist_id=None, playlist_title=None):
|
def playlist_result(entries, playlist_id=None, playlist_title=None, playlist_description=None):
|
||||||
"""Returns a playlist"""
|
"""Returns a playlist"""
|
||||||
video_info = {'_type': 'playlist',
|
video_info = {'_type': 'playlist',
|
||||||
'entries': entries}
|
'entries': entries}
|
||||||
@ -447,6 +447,8 @@ class InfoExtractor(object):
|
|||||||
video_info['id'] = playlist_id
|
video_info['id'] = playlist_id
|
||||||
if playlist_title:
|
if playlist_title:
|
||||||
video_info['title'] = playlist_title
|
video_info['title'] = playlist_title
|
||||||
|
if playlist_description:
|
||||||
|
video_info['description'] = playlist_description
|
||||||
return video_info
|
return video_info
|
||||||
|
|
||||||
def _search_regex(self, pattern, string, name, default=_NO_DEFAULT, fatal=True, flags=0, group=None):
|
def _search_regex(self, pattern, string, name, default=_NO_DEFAULT, fatal=True, flags=0, group=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user