]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Revert "[history] fix signature and media url extraction(fixes #8240)"
authorremitamine <remitamine@gmail.com>
Fri, 15 Jan 2016 13:54:39 +0000 (14:54 +0100)
committerremitamine <remitamine@gmail.com>
Fri, 15 Jan 2016 13:54:39 +0000 (14:54 +0100)
This reverts commit ffbc0baf72f456b1f4f4ac989e4a7b75b69c7a54.

youtube_dl/extractor/history.py
youtube_dl/extractor/theplatform.py

index 1866ca679bf04918b376c18e79bbdc046dc23a47..f86164afe791dbfddad8240dfcfa8a0f441c7e11 100644 (file)
@@ -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'}}))
index 10f2cad5518d3f3627119cd09a9a812f986cc83c..0bf6726b53641734fd0fcafb73a76d8c3621b302 100644 (file)
@@ -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 = [{