diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-03-19 21:26:57 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-03-19 21:26:57 +0600 |
commit | 3378d67a18d2d06574698168120bf8c7f7b9e172 (patch) | |
tree | 82844d6d26b39e7ec2476137499861874d74f004 /youtube_dl/extractor/generic.py | |
parent | f3c0c667a6d8d1b58ca198b72a353887ea8c4f38 (diff) |
[generic] Add support for nytimes embeds (Closes #5234)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r-- | youtube_dl/extractor/generic.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index dc5755d12..8716e4503 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1006,6 +1006,13 @@ class GenericIE(InfoExtractor): if mobj is not None: return self.url_result(mobj.group('url')) + # Look for NYTimes player + mobj = re.search( + r'<iframe[^>]+src=(["\'])(?P<url>(?:https?:)?//graphics8\.nytimes\.com/bcvideo/[^/]+/iframe/embed\.html.+?)\1>', + webpage) + if mobj is not None: + return self.url_result(mobj.group('url')) + # Look for Ooyala videos mobj = (re.search(r'player\.ooyala\.com/[^"?]+\?[^"]*?(?:embedCode|ec)=(?P<ec>[^"&]+)', webpage) or re.search(r'OO\.Player\.create\([\'"].*?[\'"],\s*[\'"](?P<ec>.{32})[\'"]', webpage) or |