mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-11 03:07:16 +08:00
Merge pull request #135 from ytdl-org/master
[pull] master from ytdl-org:master
This commit is contained in:
commit
06b0b48024
@ -123,12 +123,6 @@ class TestAllURLsMatching(unittest.TestCase):
|
|||||||
self.assertMatch('http://video.pbs.org/viralplayer/2365173446/', ['pbs'])
|
self.assertMatch('http://video.pbs.org/viralplayer/2365173446/', ['pbs'])
|
||||||
self.assertMatch('http://video.pbs.org/widget/partnerplayer/980042464/', ['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):
|
def test_no_duplicated_ie_names(self):
|
||||||
name_accu = collections.defaultdict(list)
|
name_accu = collections.defaultdict(list)
|
||||||
for ie in self.ies:
|
for ie in self.ies:
|
||||||
|
@ -86,9 +86,10 @@ class MixcloudIE(InfoExtractor):
|
|||||||
r'<script id="relay-data" type="text/x-mixcloud">([^<]+)</script>',
|
r'<script id="relay-data" type="text/x-mixcloud">([^<]+)</script>',
|
||||||
webpage, 'play info'), 'play info')
|
webpage, 'play info'), 'play info')
|
||||||
for item in full_info_json:
|
for item in full_info_json:
|
||||||
item_data = try_get(
|
item_data = try_get(item, [
|
||||||
item, lambda x: x['cloudcast']['data']['cloudcastLookup'],
|
lambda x: x['cloudcast']['data']['cloudcastLookup'],
|
||||||
dict)
|
lambda x: x['cloudcastLookup']['data']['cloudcastLookup'],
|
||||||
|
], dict)
|
||||||
if try_get(item_data, lambda x: x['streamInfo']['url']):
|
if try_get(item_data, lambda x: x['streamInfo']['url']):
|
||||||
info_json = item_data
|
info_json = item_data
|
||||||
break
|
break
|
||||||
|
@ -25,7 +25,7 @@ from .brightcove import BrightcoveNewIE
|
|||||||
|
|
||||||
class YahooIE(InfoExtractor):
|
class YahooIE(InfoExtractor):
|
||||||
IE_DESC = 'Yahoo screen and movies'
|
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 = [{
|
_TESTS = [{
|
||||||
'url': 'http://screen.yahoo.com/julian-smith-travis-legg-watch-214727115.html',
|
'url': 'http://screen.yahoo.com/julian-smith-travis-legg-watch-214727115.html',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -171,6 +171,9 @@ class YahooIE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'https://es-us.noticias.yahoo.com/es-la-puerta-irrompible-que-110539379.html',
|
'url': 'https://es-us.noticias.yahoo.com/es-la-puerta-irrompible-que-110539379.html',
|
||||||
'only_matching': True,
|
'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):
|
def _real_extract(self, url):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user