1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

Loosened regex on DailyMotion videos to allow for matching of private video urls.

This commit is contained in:
Jonathon Padfield 2012-02-26 11:00:52 +11:00
parent 0269764b07
commit 20b2a55968

View File

@ -1593,7 +1593,7 @@ class MetacafeIE(InfoExtractor):
class DailymotionIE(InfoExtractor): class DailymotionIE(InfoExtractor):
"""Information Extractor for Dailymotion""" """Information Extractor for Dailymotion"""
_VALID_URL = r'(?i)(?:https?://)?(?:www\.)?dailymotion\.[a-z]{2,3}/video/([^_/]+)_([^/]+)' _VALID_URL = r'(?i)(?:https?://)?(?:www\.)?dailymotion\.[a-z]{2,3}/video/(.+)'
IE_NAME = u'dailymotion' IE_NAME = u'dailymotion'
def __init__(self, downloader=None): def __init__(self, downloader=None):
@ -1608,7 +1608,7 @@ class DailymotionIE(InfoExtractor):
self._downloader.to_screen(u'[dailymotion] %s: Extracting information' % video_id) self._downloader.to_screen(u'[dailymotion] %s: Extracting information' % video_id)
def _real_extract(self, url): def _real_extract(self, url):
# Extract id and simplified title from URL # Extract id
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)
if mobj is None: if mobj is None:
self._downloader.trouble(u'ERROR: invalid URL: %s' % url) self._downloader.trouble(u'ERROR: invalid URL: %s' % url)