aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-20 21:33:31 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-20 21:33:31 +0600
commitaa5957ac49aad5165ce9ab5b9403539d61a09dcf (patch)
tree489a1a83d24f358d987c38bc613afa3db6432af2 /youtube_dl
parent64413f7563eb7a89e06ede91fc135de73bc57db4 (diff)
[extractor/generic] Add support for async wistia embeds (Closes #9549)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/generic.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index a6b1e23e3..632d7b5f0 100644
--- a/youtube_dl/extractor/generic.py
+++ b/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: