summary refs log tree commit diff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2020-01-06 14:24:13 +0100
committerRemita Amine <remitamine@gmail.com>2020-01-06 14:25:54 +0100
commit2f7aa680b79b60d707d7b09818e3ec55748448b2 (patch)
tree02fe8e3b717fb0a887a2388e97f0047195abd9ee
parent0d2306d02beb4c1e50c3f279c109ab25f94ae421 (diff)
downloadyoutube-dl-2f7aa680b79b60d707d7b09818e3ec55748448b2.tar.gz
youtube-dl-2f7aa680b79b60d707d7b09818e3ec55748448b2.tar.xz
youtube-dl-2f7aa680b79b60d707d7b09818e3ec55748448b2.zip
[discovery] fix anonymous token extraction(closes #23650)
-rw-r--r--youtube_dl/extractor/discovery.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/youtube_dl/extractor/discovery.py b/youtube_dl/extractor/discovery.py
index 6a2712cc5..e0139cc86 100644
--- a/youtube_dl/extractor/discovery.py
+++ b/youtube_dl/extractor/discovery.py
@@ -13,8 +13,8 @@ from ..compat import compat_HTTPError
 class DiscoveryIE(DiscoveryGoBaseIE):
     _VALID_URL = r'''(?x)https?://
         (?P<site>
-            (?:(?:www|go)\.)?discovery|
-            (?:www\.)?
+            go\.discovery|
+            www\.
                 (?:
                     investigationdiscovery|
                     discoverylife|
@@ -22,8 +22,7 @@ class DiscoveryIE(DiscoveryGoBaseIE):
                     ahctv|
                     destinationamerica|
                     sciencechannel|
-                    tlc|
-                    velocity
+                    tlc
                 )|
             watch\.
                 (?:
@@ -83,7 +82,7 @@ class DiscoveryIE(DiscoveryGoBaseIE):
                     'authRel': 'authorization',
                     'client_id': '3020a40c2356a645b4b4',
                     'nonce': ''.join([random.choice(string.ascii_letters) for _ in range(32)]),
-                    'redirectUri': 'https://fusion.ddmcdn.com/app/mercury-sdk/180/redirectHandler.html?https://www.%s.com' % site,
+                    'redirectUri': 'https://www.discovery.com/',
                 })['access_token']
 
         headers = self.geo_verification_headers()