Browse Source

[generic] Add support for nytimes embeds (Closes #5234)

totalwebcasting
Sergey M․ 10 years ago
parent
commit
3378d67a18
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      youtube_dl/extractor/generic.py

+ 7
- 0
youtube_dl/extractor/generic.py View File

@ -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


Loading…
Cancel
Save