aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authordinesh <dsdiscoverdinesh@gmail.com>2014-10-23 20:27:13 +0530
committerdinesh <dsdiscoverdinesh@gmail.com>2014-10-23 20:28:39 +0530
commit52cffcb186432f9f1b30fba159414aff6a923f59 (patch)
tree89c0d3b76b06f1367cd76f0e9e2fc9eaa349f68f /youtube_dl/extractor/generic.py
parent8f3b5397a761d68122bc1bd66d049fbbe31289a2 (diff)
[thoughtworks] wistia support added
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 9057a6beb..877447381 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -380,6 +380,16 @@ class GenericIE(InfoExtractor):
'uploader': 'education-portal.com',
},
},
+ {
+ 'url': 'http://thoughtworks.wistia.com/medias/uxjb0lwrcz',
+ 'md5': 'baf49c2baa8a7de5f3fc145a8506dcd4',
+ 'info_dict': {
+ 'id': 'uxjb0lwrcz',
+ 'ext': 'mp4',
+ 'title': 'Conversation about Hexagonal Rails Part 1',
+ 'duration': 1715.0,
+ },
+ },
]
def report_following_redirect(self, new_url):
@@ -651,6 +661,10 @@ class GenericIE(InfoExtractor):
playlists, lambda p: '//dailymotion.com/playlist/%s' % p)
# Look for embedded Wistia player
+ mobj = re.search(r'<meta content=(["\'])(?P<url>https?://fast\.wistia\.net/embed/iframe/(?P<id>[a-zA-Z0-9_]+)(["\']))', webpage)
+ if mobj:
+ return self.url_result(mobj.group('url'), 'Wistia')
+
match = re.search(
r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:fast\.)?wistia\.net/embed/iframe/.+?)\1', webpage)
if match:
@@ -664,6 +678,7 @@ class GenericIE(InfoExtractor):
'title': video_title,
'id': video_id,
}
+
match = re.search(r'(?:id=["\']wistia_|data-wistia-?id=["\']|Wistia\.embed\(["\'])(?P<id>[^"\']+)', webpage)
if match:
return {