projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f843300
)
[onionstudios] Add generic embed extraction routine
author
Sergey M․
<dstftw@gmail.com>
Wed, 24 Jun 2015 17:16:33 +0000
(23:16 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 24 Jun 2015 17:16:33 +0000
(23:16 +0600)
youtube_dl/extractor/onionstudios.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/onionstudios.py
b/youtube_dl/extractor/onionstudios.py
index d5d03fd443e2c68d7f71b41239638110bea4379a..8fa507dec7e3b8fc0e48bc679d03192a2cc63bf4 100644
(file)
--- a/
youtube_dl/extractor/onionstudios.py
+++ b/
youtube_dl/extractor/onionstudios.py
@@
-27,6
+27,13
@@
class OnionStudiosIE(InfoExtractor):
'only_matching': True,
}]
+ @staticmethod
+ def _extract_url(webpage):
+ mobj = re.search(
+ r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?onionstudios\.com/embed.+?)\1', webpage)
+ if mobj:
+ return mobj.group('url')
+
def _real_extract(self, url):
video_id = self._match_id(url)