aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/wdr.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-10-08 21:36:50 +0700
committerSergey M․ <dstftw@gmail.com>2017-10-08 21:36:50 +0700
commit89923316210f8e17bb1a085278940e1c56fcff48 (patch)
tree0c80781aac4b013d985d424e66b20a7074ef5c7c /youtube_dl/extractor/wdr.py
parentb0dde6686c7110c9c2515a808d803239a81e6505 (diff)
downloadyoutube-dl-89923316210f8e17bb1a085278940e1c56fcff48.zip
youtube-dl-89923316210f8e17bb1a085278940e1c56fcff48.tar.gz
youtube-dl-89923316210f8e17bb1a085278940e1c56fcff48.tar.bz2
[wdr] Relax media link regex (closes #14447)
Diffstat (limited to 'youtube_dl/extractor/wdr.py')
-rw-r--r--youtube_dl/extractor/wdr.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/youtube_dl/extractor/wdr.py b/youtube_dl/extractor/wdr.py
index 8bb7362..621de1e 100644
--- a/youtube_dl/extractor/wdr.py
+++ b/youtube_dl/extractor/wdr.py
@@ -22,8 +22,13 @@ class WDRBaseIE(InfoExtractor):
# for wdrmaus, in a tag with the class "videoButton" (previously a link
# to the page in a multiline "videoLink"-tag)
json_metadata = self._html_search_regex(
- r'class=(?:"(?:mediaLink|wdrrPlayerPlayBtn|videoButton)\b[^"]*"[^>]+|"videoLink\b[^"]*"[\s]*>\n[^\n]*)data-extension="([^"]+)"',
- webpage, 'media link', default=None, flags=re.MULTILINE)
+ r'''(?sx)class=
+ (?:
+ (["\'])(?:mediaLink|wdrrPlayerPlayBtn|videoButton)\b.*?\1[^>]+|
+ (["\'])videoLink\b.*?\2[\s]*>\n[^\n]*
+ )data-extension=(["\'])(?P<data>(?:(?!\3).)+)\3
+ ''',
+ webpage, 'media link', default=None, group='data')
if not json_metadata:
return