projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dfe9bc
)
[generic] Add support for playwire embeds (Closes #5430)
author
Sergey M․
<dstftw@gmail.com>
Wed, 15 Apr 2015 16:10:08 +0000
(22:10 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 15 Apr 2015 16:10:08 +0000
(22:10 +0600)
youtube_dl/extractor/generic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index eaf9c769a239a0e3276e890c959e00c5cee84815..ab35386945d5a147de7ef05cb80d4b870c77b9f8 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-1310,6
+1310,12
@@
class GenericIE(InfoExtractor):
if mobj is not None:
return self.url_result(mobj.group('url'), 'Pladform')
+ # Look for Playwire embeds
+ mobj = re.search(
+ r'<script[^>]+data-config=(["\'])(?P<url>(?:https?:)?//config\.playwire\.com/.+?)\1', webpage)
+ if mobj is not None:
+ return self.url_result(mobj.group('url'))
+
# Look for 5min embeds
mobj = re.search(
r'<meta[^>]+property="og:video"[^>]+content="https?://embed\.5min\.com/(?P<id>[0-9]+)/?', webpage)