[qqmusic] Use meaningful variable names
authorYen Chi Hsuan <yan12125@gmail.com>
Fri, 5 Jun 2015 15:19:25 +0000 (23:19 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Fri, 5 Jun 2015 15:19:25 +0000 (23:19 +0800)
youtube_dl/extractor/qqmusic.py

index c903bee58c792ec870ff2c7687b080a34fce78a4..bafa81c21c12f15ac8162f8303f56615124b260b 100644 (file)
@@ -76,14 +76,14 @@ class QQMusicIE(InfoExtractor):
             transform_source=strip_jsonp)['key']
 
         formats = []
-        for k, f in self._FORMATS.items():
+        for format_id, details in self._FORMATS.items():
             formats.append({
                 'url': 'http://cc.stream.qqmusic.qq.com/%s%s.%s?vkey=%s&guid=%s&fromtag=0'
-                       % (f['prefix'], mid, f['ext'], vkey, guid),
-                'format': k,
-                'format_id': k,
-                'preference': f['preference'],
-                'abr': f.get('abr')
+                       % (details['prefix'], mid, details['ext'], vkey, guid),
+                'format': format_id,
+                'format_id': format_id,
+                'preference': details['preference'],
+                'abr': details.get('abr'),
             })
         self._sort_formats(formats)