A feature-rich command-line audio/video downloader
Revert "[history] fix signature and media url extraction(fixes #8240)"
remitaminefad7a336a162
diff --git a/youtube_dl/extractor/history.py b/youtube_dl/extractor/history.pyindex 1866ca679b..f86164afe7 100644--- a/youtube_dl/extractor/history.py+++ b/youtube_dl/extractor/history.py@@ -2,7 +2,6 @@ from __future__ import unicode_literalsfrom .common import InfoExtractorfrom ..utils import smuggle_url-from ..compat import compat_urllib_parseclass 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'}}))diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.pyindex 10f2cad551..0bf6726b53 100644--- a/youtube_dl/extractor/theplatform.py+++ b/youtube_dl/extractor/theplatform.py@@ -85,7 +85,7 @@ class ThePlatformBaseIE(InfoExtractor):class ThePlatformIE(ThePlatformBaseIE):_VALID_URL = r'''(?x)(?:https?://(?:link|player)\.theplatform\.com/[sp]/(?P<provider_id>[^/]+)/- (?:(?P<media>(?:(?:[^/]+/)+select/)?media/)|(?P<config>(?:[^/\?]+/(?:swf|config)|onsite)/select/))?+ (?:(?P<media>(?:[^/]+/)+select/media/)|(?P<config>(?:[^/\?]+/(?:swf|config)|onsite)/select/))?|theplatform:)(?P<id>[^/\?&]+)'''_TESTS = [{