[dailymotion] Add support for URLs starting with //

This will happen if a site embeds dailymotion like this:
    <iframe src="//www.dailymotion.com/embed/ [...]
in order to be compatible with both http and https and prevent mixed
content blocking.

It will be detected by the generic extractor, but then fail to be
accepted by the information extractor.

This protocol matching should probably be extended to other extractors
(although vimeo and youtube extractor already do this)
This commit is contained in:
Anisse Astier 2014-04-28 15:02:41 +02:00
parent 7c360e3a04
commit 67a3576740

View File

@ -27,7 +27,7 @@ class DailymotionBaseInfoExtractor(InfoExtractor):
class DailymotionIE(DailymotionBaseInfoExtractor, SubtitlesInfoExtractor):
"""Information Extractor for Dailymotion"""
_VALID_URL = r'(?i)(?:https?://)?(?:(www|touch)\.)?dailymotion\.[a-z]{2,3}/(?:(embed|#)/)?video/(?P<id>[^/?_]+)'
_VALID_URL = r'(?i)(?:(?:https?:)?//)?(?:(www|touch)\.)?dailymotion\.[a-z]{2,3}/(?:(embed|#)/)?video/(?P<id>[^/?_]+)'
IE_NAME = u'dailymotion'
_FORMATS = [