projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81f36eb
)
[generic] Support Vine embeds (#8817)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Wed, 23 Mar 2016 15:55:08 +0000
(23:55 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Wed, 23 Mar 2016 15:55:08 +0000
(23:55 +0800)
youtube_dl/extractor/generic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index 26de27a7e2a86abae8a2c2fa79bce94645826b6f..93e0563b584f79076d05842d21ea8557aade0055 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-1909,6
+1909,14
@@
class GenericIE(InfoExtractor):
self._proto_relative_url(unescapeHTML(mobj.group(1))),
'AdobeTVVideo')
+ # Look for Vine embeds
+ mobj = re.search(
+ r'<iframe[^>]+src=[\'"]((?:https?:)?//(?:www\.)?vine\.co/v/[^/]+/embed/(?:simple|postcard))',
+ webpage)
+ if mobj is not None:
+ return self.url_result(
+ self._proto_relative_url(unescapeHTML(mobj.group(1))), 'Vine')
+
def check_video(vurl):
if YoutubeIE.suitable(vurl):
return True