aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaglis Jonaitis <njonaitis@gmail.com>2014-11-12 19:26:00 +0200
committerNaglis Jonaitis <njonaitis@gmail.com>2014-11-12 19:26:00 +0200
commit73689dafbfb394a7820a9917b044d37f6392ce01 (patch)
treee681c1d960f14ddb949404c62d9d6555b8fa7b91
parent4b50ba0989f4c3ab82321ede0eb08391efd0e39f (diff)
[tvplay] Fix f4m URL extraction (Closes #4119)
Add query parameters which are needed by AkamaiHD F4M player. Also, modernize a bit.
-rw-r--r--youtube_dl/extractor/tvplay.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/tvplay.py b/youtube_dl/extractor/tvplay.py
index 445e0ec41..eb9473754 100644
--- a/youtube_dl/extractor/tvplay.py
+++ b/youtube_dl/extractor/tvplay.py
@@ -4,9 +4,9 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
+from ..compat import compat_str
from ..utils import (
ExtractorError,
- compat_str,
parse_iso8601,
qualities,
)
@@ -176,8 +176,7 @@ class TVPlayIE(InfoExtractor):
]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
+ video_id = self._match_id(url)
video = self._download_json(
'http://playapi.mtgx.tv/v1/videos/%s' % video_id, video_id, 'Downloading video JSON')
@@ -208,6 +207,10 @@ class TVPlayIE(InfoExtractor):
'app': m.group('app'),
'play_path': m.group('playpath'),
})
+ elif video_url.endswith('.f4m'):
+ formats.extend(self._extract_f4m_formats(
+ video_url + '?hdcore=3.5.0&plugin=aasp-3.5.0.151.81', video_id))
+ continue
else:
fmt.update({
'url': video_url,