[extractor/generic] Improve dailymotion embed detection (Closes #8521, closes #8325)
authorSergey M․ <dstftw@gmail.com>
Fri, 12 Feb 2016 16:03:10 +0000 (22:03 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 12 Feb 2016 16:03:10 +0000 (22:03 +0600)
youtube_dl/extractor/generic.py

index bf61ab2e7c3522054caaeb6bc5dd6b1c4897ffe8..ede9801bbbf1984a8aac373764e43dbe58afc881 100644 (file)
@@ -1413,7 +1413,7 @@ class GenericIE(InfoExtractor):
 
         # Look for embedded Dailymotion player
         matches = re.findall(
-            r'<(?:embed|iframe)[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/(?:embed|swf)/video/.+?)\1', webpage)
+            r'<(?:(?:embed|iframe)[^>]+?src=|input[^>]+id=[\'"]dmcloudUrlEmissionSelect[\'"][^>]+value=)(["\'])(?P<url>(?:https?:)?//(?:www\.)?dailymotion\.com/(?:embed|swf)/video/.+?)\1', webpage)
         if matches:
             return _playlist_from_matches(
                 matches, lambda m: unescapeHTML(m[1]))