diff options
author | Philipp Hagemeister <[email protected]> | 2014-03-05 14:01:53 +0100 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2014-03-05 14:01:53 +0100 |
commit | f55a1f0a8815c89b01a7a353cfa0bd5118f75829 (patch) | |
tree | 615bd31e7405d059648ab3ddc973af6bc61824c0 | |
parent | bacac173a9ab310f48555bcb5796e11701cff899 (diff) | |
parent | 1b86cc41cf3f7db5893597b4b1956104a77147f7 (diff) | |
download | youtube-dl-f55a1f0a8815c89b01a7a353cfa0bd5118f75829.tar.gz youtube-dl-f55a1f0a8815c89b01a7a353cfa0bd5118f75829.zip |
Merge remote-tracking branch 'rzhxeo/embedly'
Conflicts:
youtube_dl/extractor/generic.py
-rw-r--r-- | youtube_dl/extractor/generic.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 641d9babb..dd60bc418 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -116,7 +116,19 @@ class GenericIE(InfoExtractor): 'params': { 'skip_download': False, } - } + }, + # embed.ly video + { + 'url': 'http://www.tested.com/science/weird/460206-tested-grinding-coffee-2000-frames-second/', + 'info_dict': { + 'id': '9ODmcdjQcHQ', + 'ext': 'mp4', + }, + # No need to test YoutubeIE here + 'params': { + 'skip_download': True, + }, + }, ] def report_download_webpage(self, video_id): @@ -407,6 +419,14 @@ class GenericIE(InfoExtractor): if mobj is not None: return self.url_result(mobj.group('url'), 'HuffPost') + # Look for embed.ly + mobj = re.search(r'class=["\']embedly-card["\'][^>]href=["\'](?P<url>[^"\']+)', webpage) + if mobj is not None: + return self.url_result(mobj.group('url')) + mobj = re.search(r'class=["\']embedly-embed["\'][^>]src=["\'][^"\']*url=(?P<url>[^&]+)', webpage) + if mobj is not None: + return self.url_result(compat_urllib_parse.unquote(mobj.group('url'))) + # Start with something easy: JW Player in SWFObject mobj = re.search(r'flashvars: [\'"](?:.*&)?file=(http[^\'"&]*)', webpage) if mobj is None: |