projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f670ef1
)
[dramafever] Streamline code
author
ping
<lipng.ong@gmail.com>
Wed, 20 May 2015 07:15:28 +0000
(15:15 +0800)
committer
ping
<lipng.ong@gmail.com>
Wed, 20 May 2015 07:15:28 +0000
(15:15 +0800)
youtube_dl/extractor/dramafever.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/dramafever.py
b/youtube_dl/extractor/dramafever.py
index 8fac99cc54c5c30eac13eb0311a1b2b0527d963f..40787ffcd2118d26d7bce98076c6d3f686653001 100644
(file)
--- 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