mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Merge pull request #1675 from rzhxeo/fix
Check if description and thumbnail are None to prevent crash
This commit is contained in:
commit
79b3f61228
1 changed files with 2 additions and 2 deletions
|
@ -575,9 +575,9 @@ def process_info(self, info_dict):
|
|||
if self.params.get('forceurl', False):
|
||||
# For RTMP URLs, also include the playpath
|
||||
compat_print(info_dict['url'] + info_dict.get('play_path', u''))
|
||||
if self.params.get('forcethumbnail', False) and 'thumbnail' in info_dict:
|
||||
if self.params.get('forcethumbnail', False) and info_dict.get('thumbnail') is not None:
|
||||
compat_print(info_dict['thumbnail'])
|
||||
if self.params.get('forcedescription', False) and 'description' in info_dict:
|
||||
if self.params.get('forcedescription', False) and info_dict.get('description') is not None:
|
||||
compat_print(info_dict['description'])
|
||||
if self.params.get('forcefilename', False) and filename is not None:
|
||||
compat_print(filename)
|
||||
|
|
Loading…
Reference in a new issue