Skip to content

Commit

Permalink
[yahoo] restore support for cbs suffixed URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Oct 31, 2019
1 parent 8040a0d commit 237513e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions test/test_all_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ def test_pbs(self):
self.assertMatch('http://video.pbs.org/viralplayer/2365173446/', ['pbs'])
self.assertMatch('http://video.pbs.org/widget/partnerplayer/980042464/', ['pbs'])

def test_yahoo_https(self):
# https://github.com/ytdl-org/youtube-dl/issues/2701
self.assertMatch(
'https://screen.yahoo.com/smartwatches-latest-wearable-gadgets-163745379-cbs.html',
['Yahoo'])

def test_no_duplicated_ie_names(self):
name_accu = collections.defaultdict(list)
for ie in self.ies:
Expand Down
5 changes: 4 additions & 1 deletion youtube_dl/extractor/yahoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class YahooIE(InfoExtractor):
IE_DESC = 'Yahoo screen and movies'
_VALID_URL = r'(?P<url>https?://(?:(?P<country>[a-zA-Z]{2}(?:-[a-zA-Z]{2})?|malaysia)\.)?(?:[\da-zA-Z_-]+\.)?yahoo\.com/(?:[^/]+/)*(?P<id>[^?&#]*-[0-9]+)\.html)'
_VALID_URL = r'(?P<url>https?://(?:(?P<country>[a-zA-Z]{2}(?:-[a-zA-Z]{2})?|malaysia)\.)?(?:[\da-zA-Z_-]+\.)?yahoo\.com/(?:[^/]+/)*(?P<id>[^?&#]*-[0-9]+)(?:-[a-z]+)?\.html)'
_TESTS = [{
'url': 'http://screen.yahoo.com/julian-smith-travis-legg-watch-214727115.html',
'info_dict': {
Expand Down Expand Up @@ -171,6 +171,9 @@ class YahooIE(InfoExtractor):
}, {
'url': 'https://es-us.noticias.yahoo.com/es-la-puerta-irrompible-que-110539379.html',
'only_matching': True,
}, {
'url': 'https://www.yahoo.com/entertainment/v/longtime-cbs-news-60-minutes-032036500-cbs.html',
'only_matching': True,
}]

def _real_extract(self, url):
Expand Down

0 comments on commit 237513e

Please sign in to comment.