aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/xfileshare.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-03-17 23:57:07 +0700
committerSergey M․ <dstftw@gmail.com>2018-03-17 23:57:07 +0700
commit178ee88319a384b66d9b2da27a819f32ba870425 (patch)
treef2fd74e2a6ec939e972c932b37c84da3a20d4403 /youtube_dl/extractor/xfileshare.py
parentd12396085754a597c2c5e621e4a68471871e2cfd (diff)
downloadyoutube-dl-178ee88319a384b66d9b2da27a819f32ba870425.tar.xz
[generic] Add support for xfileshare embeds (closes #15879)
Diffstat (limited to 'youtube_dl/extractor/xfileshare.py')
-rw-r--r--youtube_dl/extractor/xfileshare.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/xfileshare.py b/youtube_dl/extractor/xfileshare.py
index ad747978d..bc3239f68 100644
--- a/youtube_dl/extractor/xfileshare.py
+++ b/youtube_dl/extractor/xfileshare.py
@@ -118,6 +118,15 @@ class XFileShareIE(InfoExtractor):
'only_matching': True
}]
+ @staticmethod
+ def _extract_urls(webpage):
+ return [
+ mobj.group('url')
+ for mobj in re.finditer(
+ r'<iframe\b[^>]+\bsrc=(["\'])(?P<url>(?:https?:)?//(?:%s)/embed-[0-9a-zA-Z]+.*?)\1'
+ % '|'.join(site for site in list(zip(*XFileShareIE._SITES))[0]),
+ webpage)]
+
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
video_id = mobj.group('id')