Browse Source

[YoutubeDL] Force string conversion on non string video ids

master
Sergey M․ 8 years ago
parent
commit
be6217b261
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 4 additions and 0 deletions
  1. 4
      youtube_dl/YoutubeDL.py

4
youtube_dl/YoutubeDL.py

@ -1223,6 +1223,10 @@ class YoutubeDL(object):
if 'title' not in info_dict:
raise ExtractorError('Missing "title" field in extractor result')
if not isinstance(info_dict['id'], compat_str):
self.report_warning('"id" field is not a string - forcing string conversion')
info_dict['id'] = compat_str(info_dict['id'])
if 'playlist' not in info_dict:
# It isn't part of a playlist
info_dict['playlist'] = None

Loading…
Cancel
Save