[extractor/generic] Make title optional for jwplayer embeds (closes #12410)
authorSergey M․ <dstftw@gmail.com>
Fri, 10 Mar 2017 16:16:53 +0000 (23:16 +0700)
committerSergey M․ <dstftw@gmail.com>
Fri, 10 Mar 2017 16:16:53 +0000 (23:16 +0700)
youtube_dl/extractor/generic.py

index bc22421aec27265265b8c61b4266db4337bbf4d7..ad47c3b6bea8fc17020d78a0d79be37fac8bda1a 100644 (file)
@@ -2550,7 +2550,10 @@ class GenericIE(InfoExtractor):
             try:
                 jwplayer_data = self._parse_json(
                     jwplayer_data_str, video_id, transform_source=js_to_json)
-                return self._parse_jwplayer_data(jwplayer_data, video_id)
+                info = self._parse_jwplayer_data(
+                    jwplayer_data, video_id, require_title=False)
+                if not info.get('title'):
+                    info['title'] = video_title
             except ExtractorError:
                 pass