Skip to content

Commit

Permalink
Revert "[discovery] limit video data by show slug(closes #21980)"
Browse files Browse the repository at this point in the history
This reverts commit d119c8f.
  • Loading branch information
Lamieur committed Apr 20, 2020
1 parent 13e97ed commit b49ed5e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions youtube_dl/extractor/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DiscoveryIE(DiscoveryGoBaseIE):
cookingchanneltv|
motortrend
)
)\.com/tv-shows/(?P<show_slug>[^/]+)/(?:video|full-episode)s/(?P<id>[^./?#]+)'''
)\.com/tv-shows/[^/]+/(?:video|full-episode)s/(?P<id>[^./?#]+)'''
_TESTS = [{
'url': 'https://go.discovery.com/tv-shows/cash-cab/videos/riding-with-matthew-perry',
'info_dict': {
Expand All @@ -53,17 +53,13 @@ class DiscoveryIE(DiscoveryGoBaseIE):
}, {
'url': 'https://go.discovery.com/tv-shows/alaskan-bush-people/videos/follow-your-own-road',
'only_matching': True,
}, {
# using `show_slug` is important to get the correct video data
'url': 'https://www.sciencechannel.com/tv-shows/mythbusters-on-science/full-episodes/christmas-special',
'only_matching': True,
}]
_GEO_COUNTRIES = ['US']
_GEO_BYPASS = False
_API_BASE_URL = 'https://api.discovery.com/v1/'

def _real_extract(self, url):
site, show_slug, display_id = re.match(self._VALID_URL, url).groups()
site, display_id = re.match(self._VALID_URL, url).groups()

access_token = None
cookies = self._get_cookies(url)
Expand Down Expand Up @@ -95,7 +91,6 @@ def _real_extract(self, url):
display_id, 'Downloading content JSON metadata',
headers=headers, query={
'slug': display_id,
'show_slug': show_slug,
})[0]
video_id = video['id']
stream = self._download_json(
Expand Down

0 comments on commit b49ed5e

Please sign in to comment.