소스 검색

fix python2

Devin J. Pohly 10 년 전
부모
커밋
65c5e044c7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      youtube_dl/extractor/beatportpro.py

+ 1 - 1
youtube_dl/extractor/beatportpro.py

@@ -48,7 +48,7 @@ class BeatportProIE(InfoExtractor):
         playables = json.loads(playables)
 
         # Find first track with matching ID (always the first one listed?)
-        track = next(filter(lambda t: t['id'] == int(track_id), playables['tracks']))
+        track = next(t for t in playables['tracks'] if t['id'] == int(track_id))
 
         # Construct title from artist(s), track name, and mix name
         title = ', '.join((a['name'] for a in track['artists'])) + ' - ' + track['name']