aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/dramafever.py
diff options
context:
space:
mode:
authorping <lipng.ong@gmail.com>2015-05-20 15:15:28 +0800
committerping <lipng.ong@gmail.com>2015-05-20 15:15:28 +0800
commit137597b0ea88a92d174341b44b8f395b8897a2bf (patch)
tree18ca8aeb7e4554d6b5e7c36fa1ccd79bf3546f2e /youtube_dl/extractor/dramafever.py
parentf670ef1c8ebe0329a68b3a3d5c2b7e07ae5c9425 (diff)
[dramafever] Streamline code
Diffstat (limited to 'youtube_dl/extractor/dramafever.py')
-rw-r--r--youtube_dl/extractor/dramafever.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/dramafever.py b/youtube_dl/extractor/dramafever.py
index 8fac99cc5..40787ffcd 100644
--- a/youtube_dl/extractor/dramafever.py
+++ b/youtube_dl/extractor/dramafever.py
@@ -80,12 +80,11 @@ class DramaFeverIE(InfoExtractor):
def _get_subtitles(self, video_id, consumer_secret):
- def match_episode(ep):
- return ep['guid'] == video_id
-
res = None
info = self._get_episodes(
- video_id.split(".")[0], consumer_secret, episode_filter=match_episode)
+ video_id.split(".")[0], consumer_secret,
+ episode_filter=lambda x: x['guid'] == video_id)
+
if len(info) == 1 and info[0]['subfile'] != '':
res = {'en': [{'url': info[0]['subfile'], 'ext': 'srt'}]}
return res