[brightcove] Add a truncated URL warning message (#3571)
authorPhilipp Hagemeister <phihag@phihag.de>
Sun, 24 Aug 2014 00:11:26 +0000 (02:11 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Sun, 24 Aug 2014 00:11:26 +0000 (02:11 +0200)
youtube_dl/extractor/brightcove.py

index 419951b6279ae87fb8f0dab1c4f5249ce221a268..eb102244a6cf15e52f9553dbfda4db413a799c58 100644 (file)
@@ -188,9 +188,13 @@ class BrightcoveIE(InfoExtractor):
             referer = smuggled_data.get('Referer', url)
             return self._get_video_info(
                 videoPlayer[0], query_str, query, referer=referer)
-        else:
+        elif 'playerKey' in query:
             player_key = query['playerKey']
             return self._get_playlist_info(player_key[0])
+        else:
+            raise ExtractorError(
+                'Cannot find playerKey= variable. Did you forget quotes in a shell invocation?',
+                expected=True)
 
     def _get_video_info(self, video_id, query_str, query, referer=None):
         request_url = self._FEDERATED_URL_TEMPLATE % query_str