projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[extractor/generic] Add support for svt embeds (Closes #5622)
[youtube-dl]
/
youtube_dl
/
extractor
/
svt.py
diff --git
a/youtube_dl/extractor/svt.py
b/youtube_dl/extractor/svt.py
index 732f0204815a9964c5ba96c9d4597df60f37b270..fc20f664b7f4e1e6267e5cbad7a191e723e204e3 100644
(file)
--- a/
youtube_dl/extractor/svt.py
+++ b/
youtube_dl/extractor/svt.py
@@
-64,6
+64,13
@@
class SVTIE(SVTBaseIE):
},
}
},
}
+ @staticmethod
+ def _extract_url(webpage):
+ mobj = re.search(
+ r'(?:<iframe src|href)="(?P<url>%s[^"]*)"' % SVTIE._VALID_URL, webpage)
+ if mobj:
+ return mobj.group('url')
+
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
widget_id = mobj.group('widget_id')
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
widget_id = mobj.group('widget_id')