]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Do not redefine variables in list comprehensions
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 8 Jul 2013 00:12:20 +0000 (02:12 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 8 Jul 2013 00:12:20 +0000 (02:12 +0200)
youtube_dl/extractor/ard.py
youtube_dl/extractor/bliptv.py
youtube_dl/extractor/youtube.py

index 5793a4129d21c8c36e20d1b57607629e3adb94fd..dbf8eed9901527edfa4001719937c070940cec85 100644 (file)
@@ -32,7 +32,7 @@ class ARDIE(InfoExtractor):
         # determine title and media streams from webpage
         html = self._download_webpage(url, video_id)
         title = re.search(self._TITLE, html).group('title')
-        streams = [m.groupdict() for m in re.finditer(self._MEDIA_STREAM, html)]
+        streams = [mo.groupdict() for mo in re.finditer(self._MEDIA_STREAM, html)]
         if not streams:
             assert '"fsk"' in html
             raise ExtractorError(u'This video is only available after 8:00 pm')
index f7af656060a380da97306d5fbf7328b9c9a84371..08b28c994272e3461bba5d99856928ff6adb6cf3 100644 (file)
@@ -189,5 +189,5 @@ class BlipTVUserIE(InfoExtractor):
             pagenum += 1
 
         urls = [u'http://blip.tv/%s' % video_id for video_id in video_ids]
-        url_entries = [self.url_result(url, 'BlipTV') for url in urls]
+        url_entries = [self.url_result(vurl, 'BlipTV') for vurl in urls]
         return [self.playlist_result(url_entries, playlist_title = username)]
index e2296d153c7dbd473daf7154cbff7550f3841e76..537f884062afdcfb6f33545038e8b397e71c7e9c 100644 (file)
@@ -697,7 +697,7 @@ class YoutubePlaylistIE(InfoExtractor):
 
         videos = [v[1] for v in sorted(videos)]
 
-        url_results = [self.url_result(url, 'Youtube') for url in videos]
+        url_results = [self.url_result(vurl, 'Youtube') for vurl in videos]
         return [self.playlist_result(url_results, playlist_id, playlist_title)]
 
 
@@ -755,7 +755,7 @@ class YoutubeChannelIE(InfoExtractor):
         self._downloader.to_screen(u'[youtube] Channel %s: Found %i videos' % (channel_id, len(video_ids)))
 
         urls = ['http://www.youtube.com/watch?v=%s' % id for id in video_ids]
-        url_entries = [self.url_result(url, 'Youtube') for url in urls]
+        url_entries = [self.url_result(eurl, 'Youtube') for eurl in urls]
         return [self.playlist_result(url_entries, channel_id)]
 
 
@@ -812,7 +812,7 @@ class YoutubeUserIE(InfoExtractor):
             pagenum += 1
 
         urls = ['http://www.youtube.com/watch?v=%s' % video_id for video_id in video_ids]
-        url_results = [self.url_result(url, 'Youtube') for url in urls]
+        url_results = [self.url_result(rurl, 'Youtube') for rurl in urls]
         return [self.playlist_result(url_results, playlist_title = username)]
 
 class YoutubeSearchIE(SearchInfoExtractor):