[youtube] Show entire player URL when -v is given
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 18 Feb 2015 09:39:14 +0000 (10:39 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 18 Feb 2015 09:39:14 +0000 (10:39 +0100)
youtube_dl/extractor/youtube.py

index 35ef4c30359cb70fa58b69eff16d75406190c5ed..2c02da2b731241dcabd7f5907136ec0f4594f793 100644 (file)
@@ -541,16 +541,21 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
         if cache_spec is not None:
             return lambda s: ''.join(s[i] for i in cache_spec)
 
+        download_note = (
+            'Downloading player %s' % player_url
+            if self._downloader.params.get('verbose') else
+            'Downloading %s player %s' % (player_type, player_id)
+        )
         if player_type == 'js':
             code = self._download_webpage(
                 player_url, video_id,
-                note='Downloading %s player %s' % (player_type, player_id),
+                note=download_note,
                 errnote='Download of %s failed' % player_url)
             res = self._parse_sig_js(code)
         elif player_type == 'swf':
             urlh = self._request_webpage(
                 player_url, video_id,
-                note='Downloading %s player %s' % (player_type, player_id),
+                note=download_note,
                 errnote='Download of %s failed' % player_url)
             code = urlh.read()
             res = self._parse_sig_swf(code)