diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-04-21 05:47:52 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-04-21 05:47:52 +0200 |
commit | fa35cdad02e1c40094f01c9f8e6529da2f021563 (patch) | |
tree | c837318ac84aecfcef8039cd27164966f3e3fd9e /youtube_dl/extractor/generic.py | |
parent | d1b9c912a42de3b99ae73553d38fbfa50b8ebc52 (diff) |
[condenast|generic] Add support for condenast embeds (Fixes #2783)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index f9b9d56d2..4b14cc5bf 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -239,6 +239,16 @@ class GenericIE(InfoExtractor): 'uploader_id': 'rbctv_2012_4', }, }, + # Condé Nast embed + { + 'url': 'http://www.wired.com/2014/04/honda-asimo/', + 'md5': 'ba0dfe966fa007657bd1443ee672db0f', + 'info_dict': { + 'id': '53501be369702d3275860000', + 'ext': 'mp4', + 'title': 'Honda’s New Asimo Robot Is More Human Than Ever', + } + } ] def report_download_webpage(self, video_id): @@ -485,6 +495,22 @@ class GenericIE(InfoExtractor): if mobj: return self.url_result(mobj.group(1), 'BlipTV') + # Look for embedded condenast player + matches = re.findall( + r'<iframe\s+(?:[a-zA-Z-]+="[^"]+"\s+)*?src="(https?://player\.cnevids\.com/embed/[^"]+")', + webpage) + if matches: + return { + '_type': 'playlist', + 'entries': [{ + '_type': 'url', + 'ie_key': 'CondeNast', + 'url': ma, + } for ma in matches], + 'title': video_title, + 'id': video_id, + } + # Look for Bandcamp pages with custom domain mobj = re.search(r'<meta property="og:url"[^>]*?content="(.*?bandcamp\.com.*?)"', webpage) if mobj is not None: |