1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-05 02:32:44 +01:00

Revert "[history] fix signature and media url extraction(fixes #8240)"

This reverts commit ffbc0baf72.
This commit is contained in:
remitamine 2016-01-15 14:54:39 +01:00
parent ffbc0baf72
commit fad7a336a1
2 changed files with 5 additions and 14 deletions

View File

@ -2,7 +2,6 @@
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import smuggle_url from ..utils import smuggle_url
from ..compat import compat_urllib_parse
class HistoryIE(InfoExtractor): class HistoryIE(InfoExtractor):
@ -20,21 +19,13 @@ class HistoryIE(InfoExtractor):
'add_ie': ['ThePlatform'], 'add_ie': ['ThePlatform'],
}] }]
_VIDEO_URL_RE = [
r"media_url\s*=\s*'[^']'",
r'data-mediaurl="([^"]+)"'
]
def _real_extract(self, url): def _real_extract(self, url):
video_id = self._match_id(url) video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
media_url = self._search_regex(self._VIDEO_URL_RE, webpage, 'video url') video_url = self._search_regex(
r'data-href="[^"]*/%s"[^>]+data-release-url="([^"]+)"' % video_id,
webpage, 'video url')
pdk_signature = webpage = self._download_webpage( return self.url_result(smuggle_url(video_url, {'sig': {'key': 'crazyjava', 'secret': 's3cr3t'}}))
'https://signature.video.aetndigital.com/?' +
compat_urllib_parse.urlencode({'url': media_url}), video_id)
return self.url_result(smuggle_url(
media_url + '?mbr=true&format=smil&sig=' + pdk_signature, {'force_smil_url': True}))

View File

@ -85,7 +85,7 @@ def get_metadata(self, path, video_id):
class ThePlatformIE(ThePlatformBaseIE): class ThePlatformIE(ThePlatformBaseIE):
_VALID_URL = r'''(?x) _VALID_URL = r'''(?x)
(?:https?://(?:link|player)\.theplatform\.com/[sp]/(?P<provider_id>[^/]+)/ (?: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>[^/\?&]+)''' |theplatform:)(?P<id>[^/\?&]+)'''
_TESTS = [{ _TESTS = [{