Browse Source

[wdr] Relax media link regex (closes #14447)

master-ytdl-org
Sergey M․ 7 years ago
parent
commit
8992331621
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      youtube_dl/extractor/wdr.py

+ 7
- 2
youtube_dl/extractor/wdr.py View File

@ -22,8 +22,13 @@ class WDRBaseIE(InfoExtractor):
# for wdrmaus, in a tag with the class "videoButton" (previously a link # for wdrmaus, in a tag with the class "videoButton" (previously a link
# to the page in a multiline "videoLink"-tag) # to the page in a multiline "videoLink"-tag)
json_metadata = self._html_search_regex( 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: if not json_metadata:
return return


Loading…
Cancel
Save