From: Sergey M․ Date: Wed, 8 Jun 2016 22:34:19 +0000 (+0700) Subject: [YoutubeDL] Force string conversion on non string video ids X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=be6217b26142491232fb697b125015d45437832d;p=youtube-dl.git [YoutubeDL] Force string conversion on non string video ids --- diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 3917ca9dc..5036289b0 100755 --- a/youtube_dl/YoutubeDL.py +++ b/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