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