mirror of https://github.com/yt-dlp/yt-dlp.git
[dailymotion] Extend _VALID_URL (closes #13079)
This commit is contained in:
parent
6f3c632c24
commit
c360e641e9
|
@ -38,7 +38,7 @@ class DailymotionBaseInfoExtractor(InfoExtractor):
|
|||
|
||||
|
||||
class DailymotionIE(DailymotionBaseInfoExtractor):
|
||||
_VALID_URL = r'(?i)(?:https?://)?(?:(www|touch)\.)?dailymotion\.[a-z]{2,3}/(?:(?:embed|swf|#)/)?video/(?P<id>[^/?_]+)'
|
||||
_VALID_URL = r'(?i)https?://(?:(www|touch)\.)?dailymotion\.[a-z]{2,3}/(?:(?:(?:embed|swf|#)/)?video|swf)/(?P<id>[^/?_]+)'
|
||||
IE_NAME = 'dailymotion'
|
||||
|
||||
_FORMATS = [
|
||||
|
@ -49,8 +49,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||
('stream_h264_hd1080_url', 'hd180'),
|
||||
]
|
||||
|
||||
_TESTS = [
|
||||
{
|
||||
_TESTS = [{
|
||||
'url': 'http://www.dailymotion.com/video/x5kesuj_office-christmas-party-review-jason-bateman-olivia-munn-t-j-miller_news',
|
||||
'md5': '074b95bdee76b9e3654137aee9c79dfe',
|
||||
'info_dict': {
|
||||
|
@ -67,8 +66,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||
'age_limit': 0,
|
||||
'view_count': int,
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
'url': 'https://www.dailymotion.com/video/x2iuewm_steam-machine-models-pricing-listed-on-steam-store-ign-news_videogames',
|
||||
'md5': '2137c41a8e78554bb09225b8eb322406',
|
||||
'info_dict': {
|
||||
|
@ -86,9 +84,8 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||
'view_count': int,
|
||||
},
|
||||
'skip': 'video gone',
|
||||
},
|
||||
}, {
|
||||
# Vevo video
|
||||
{
|
||||
'url': 'http://www.dailymotion.com/video/x149uew_katy-perry-roar-official_musi',
|
||||
'info_dict': {
|
||||
'title': 'Roar (Official)',
|
||||
|
@ -101,9 +98,8 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||
'skip_download': True,
|
||||
},
|
||||
'skip': 'VEVO is only available in some countries',
|
||||
},
|
||||
}, {
|
||||
# age-restricted video
|
||||
{
|
||||
'url': 'http://www.dailymotion.com/video/xyh2zz_leanna-decker-cyber-girl-of-the-year-desires-nude-playboy-plus_redband',
|
||||
'md5': '0d667a7b9cebecc3c89ee93099c4159d',
|
||||
'info_dict': {
|
||||
|
@ -114,22 +110,21 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
|||
'age_limit': 18,
|
||||
},
|
||||
'skip': 'video gone',
|
||||
},
|
||||
}, {
|
||||
# geo-restricted, player v5
|
||||
{
|
||||
'url': 'http://www.dailymotion.com/video/xhza0o',
|
||||
'only_matching': True,
|
||||
},
|
||||
}, {
|
||||
# with subtitles
|
||||
{
|
||||
'url': 'http://www.dailymotion.com/video/x20su5f_the-power-of-nightmares-1-the-rise-of-the-politics-of-fear-bbc-2004_news',
|
||||
'only_matching': True,
|
||||
},
|
||||
{
|
||||
}, {
|
||||
'url': 'http://www.dailymotion.com/swf/video/x3n92nf',
|
||||
'only_matching': True,
|
||||
}
|
||||
]
|
||||
}, {
|
||||
'url': 'http://www.dailymotion.com/swf/x3ss1m_funny-magic-trick-barry-and-stuart_fun',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
@staticmethod
|
||||
def _extract_urls(webpage):
|
||||
|
|
Loading…
Reference in New Issue