Browse Source

[extractor/generic] Add support for async wistia embeds (Closes #9549)

master
Sergey M․ 8 years ago
parent
commit
aa5957ac49
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 9 additions and 0 deletions
  1. 9
      youtube_dl/extractor/generic.py

9
youtube_dl/extractor/generic.py

@ -1563,6 +1563,15 @@ class GenericIE(InfoExtractor):
'id': match.group('id')
}
match = re.search(
r'''(?sx)
<script[^>]+src=(["'])(?:https?:)?//fast\.wistia\.com/assets/external/E-v1\.js\1[^>]*>.*?
<div[^>]+class=(["']).*?\bwistia_async_(?P<id>[a-z0-9]+)\b.*?\2
''', webpage)
if match:
return self.url_result(self._proto_relative_url(
'wistia:%s' % match.group('id')), 'Wistia')
# Look for SVT player
svt_url = SVTIE._extract_url(webpage)
if svt_url:

Loading…
Cancel
Save