aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/history.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-01-15 14:54:39 +0100
committerremitamine <remitamine@gmail.com>2016-01-15 14:54:39 +0100
commitfad7a336a162cda2a53a77bf24fe9f666ec3ce07 (patch)
treeb78d826ad0dc32c70fa4a4354b7db5b420eb9dbc /youtube_dl/extractor/history.py
parentffbc0baf72f456b1f4f4ac989e4a7b75b69c7a54 (diff)
Revert "[history] fix signature and media url extraction(fixes #8240)"
This reverts commit ffbc0baf72f456b1f4f4ac989e4a7b75b69c7a54.
Diffstat (limited to 'youtube_dl/extractor/history.py')
-rw-r--r--youtube_dl/extractor/history.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/youtube_dl/extractor/history.py b/youtube_dl/extractor/history.py
index 1866ca679..f86164afe 100644
--- a/youtube_dl/extractor/history.py
+++ b/youtube_dl/extractor/history.py
@@ -2,7 +2,6 @@ from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import smuggle_url
-from ..compat import compat_urllib_parse
class HistoryIE(InfoExtractor):
@@ -20,21 +19,13 @@ class HistoryIE(InfoExtractor):
'add_ie': ['ThePlatform'],
}]
- _VIDEO_URL_RE = [
- r"media_url\s*=\s*'[^']'",
- r'data-mediaurl="([^"]+)"'
- ]
-
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- media_url = self._search_regex(self._VIDEO_URL_RE, webpage, 'video url')
-
- pdk_signature = webpage = self._download_webpage(
- 'https://signature.video.aetndigital.com/?' +
- compat_urllib_parse.urlencode({'url': media_url}), video_id)
+ video_url = self._search_regex(
+ r'data-href="[^"]*/%s"[^>]+data-release-url="([^"]+)"' % video_id,
+ webpage, 'video url')
- return self.url_result(smuggle_url(
- media_url + '?mbr=true&format=smil&sig=' + pdk_signature, {'force_smil_url': True}))
+ return self.url_result(smuggle_url(video_url, {'sig': {'key': 'crazyjava', 'secret': 's3cr3t'}}))