1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 23:07:16 +08:00

Merge pull request #222 from ytdl-org/master

[pull] master from ytdl-org:master
This commit is contained in:
pull[bot] 2020-01-06 13:40:05 +00:00 committed by GitHub
commit 4a5bdd089d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -13,8 +13,8 @@ from ..compat import compat_HTTPError
class DiscoveryIE(DiscoveryGoBaseIE): class DiscoveryIE(DiscoveryGoBaseIE):
_VALID_URL = r'''(?x)https?:// _VALID_URL = r'''(?x)https?://
(?P<site> (?P<site>
(?:(?:www|go)\.)?discovery| go\.discovery|
(?:www\.)? www\.
(?: (?:
investigationdiscovery| investigationdiscovery|
discoverylife| discoverylife|
@ -22,8 +22,7 @@ class DiscoveryIE(DiscoveryGoBaseIE):
ahctv| ahctv|
destinationamerica| destinationamerica|
sciencechannel| sciencechannel|
tlc| tlc
velocity
)| )|
watch\. watch\.
(?: (?:
@ -83,7 +82,7 @@ class DiscoveryIE(DiscoveryGoBaseIE):
'authRel': 'authorization', 'authRel': 'authorization',
'client_id': '3020a40c2356a645b4b4', 'client_id': '3020a40c2356a645b4b4',
'nonce': ''.join([random.choice(string.ascii_letters) for _ in range(32)]), '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'] })['access_token']
headers = self.geo_verification_headers() headers = self.geo_verification_headers()

View File

@ -106,7 +106,7 @@ class ScrippsNetworksWatchIE(AWSIE):
class ScrippsNetworksIE(InfoExtractor): class ScrippsNetworksIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?(?P<site>cookingchanneltv|(?:diy|food)network|hgtv|travelchannel)\.com/videos/[0-9a-z-]+-(?P<id>\d+)' _VALID_URL = r'https?://(?:www\.)?(?P<site>cookingchanneltv|discovery|(?:diy|food)network|hgtv|travelchannel)\.com/videos/[0-9a-z-]+-(?P<id>\d+)'
_TESTS = [{ _TESTS = [{
'url': 'https://www.cookingchanneltv.com/videos/the-best-of-the-best-0260338', 'url': 'https://www.cookingchanneltv.com/videos/the-best-of-the-best-0260338',
'info_dict': { 'info_dict': {
@ -131,9 +131,13 @@ class ScrippsNetworksIE(InfoExtractor):
}, { }, {
'url': 'https://www.travelchannel.com/videos/two-climates-one-bag-5302184', 'url': 'https://www.travelchannel.com/videos/two-climates-one-bag-5302184',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://www.discovery.com/videos/guardians-of-the-glades-cooking-with-tom-cobb-5578368',
'only_matching': True,
}] }]
_ACCOUNT_MAP = { _ACCOUNT_MAP = {
'cookingchanneltv': 2433005105, 'cookingchanneltv': 2433005105,
'discovery': 2706091867,
'diynetwork': 2433004575, 'diynetwork': 2433004575,
'foodnetwork': 2433005105, 'foodnetwork': 2433005105,
'hgtv': 2433004575, 'hgtv': 2433004575,