aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorNaglis Jonaitis <njonaitis@gmail.com>2014-10-18 01:52:55 +0300
committerNaglis Jonaitis <njonaitis@gmail.com>2014-10-18 01:55:21 +0300
commit9471c4440599b02bf648091560097eaab690db50 (patch)
tree2d95681b49df18f3a46200e91410785d7dcf4f29 /youtube_dl/extractor/generic.py
parent013bfdd84c09049cffff365fb81a60fdef51f125 (diff)
[generic] Make sure Wistia embed URLs contain the protocol (Closes #3977)
Also, improve detection (Addresses #3662)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 158dc95a5..9057a6beb 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -654,15 +654,17 @@ class GenericIE(InfoExtractor):
match = re.search(
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:fast\.)?wistia\.net/embed/iframe/.+?)\1', webpage)
if match:
+ embed_url = self._proto_relative_url(
+ unescapeHTML(match.group('url')))
return {
'_type': 'url_transparent',
- 'url': unescapeHTML(match.group('url')),
+ 'url': embed_url,
'ie_key': 'Wistia',
'uploader': video_uploader,
'title': video_title,
'id': video_id,
}
- match = re.search(r'(?:id=["\']wistia_|data-wistiaid=["\']|Wistia\.embed\(["\'])(?P<id>[^"\']+)', webpage)
+ match = re.search(r'(?:id=["\']wistia_|data-wistia-?id=["\']|Wistia\.embed\(["\'])(?P<id>[^"\']+)', webpage)
if match:
return {
'_type': 'url_transparent',