aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-09-27 01:10:39 +0600
committerSergey M․ <dstftw@gmail.com>2015-09-27 01:10:39 +0600
commitc471b34575eac87b0841616dd6acb90b221c6fe6 (patch)
tree3fd9d14094cb92f9f129592fbd58c197fde656fa
parentd045f0bdb72bc3f84cbcfa5fd940c46d3360b386 (diff)
[eagleplatform] Simplify secure mp4 construction and clarify rationale
-rw-r--r--youtube_dl/extractor/eagleplatform.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/eagleplatform.py b/youtube_dl/extractor/eagleplatform.py
index 8bf88c77d..43336e57f 100644
--- a/youtube_dl/extractor/eagleplatform.py
+++ b/youtube_dl/extractor/eagleplatform.py
@@ -89,7 +89,9 @@ class EaglePlatformIE(InfoExtractor):
'mp4', entry_protocol='m3u8_native')
mp4_url = self._get_video_url(
- secure_m3u8.replace("m3u8", "mp4").replace("hlsvod", "mp4").replace("hls", "mp4"),
+ # Secure mp4 URL is constructed according to Player.prototype.mp4 from
+ # http://lentaru.media.eagleplatform.com/player/player.js
+ re.sub(r'm3u8|hlsvod|hls|f4m', 'mp4', secure_m3u8),
video_id, 'Downloading mp4 JSON')
formats.append({'url': mp4_url, 'format_id': 'mp4'})