diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-01-25 23:27:22 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-01-25 23:27:22 +0700 |
commit | 17f8deeb481a7aa3079d7e11da2c255f893b9e8c (patch) | |
tree | 17ce1772003e5715488d50bbb51c2b2849d8b843 /youtube_dl/extractor/openload.py | |
parent | b8a03b66601f6af9e6b4009cba634dac6e0d30e6 (diff) |
[extractor/generic] Add support for openload embeds (closes #11536, closes #11812)
Diffstat (limited to 'youtube_dl/extractor/openload.py')
-rw-r--r-- | youtube_dl/extractor/openload.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 3d4ad7dca..4893ade5d 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -1,6 +1,8 @@ # coding: utf-8 from __future__ import unicode_literals +import re + from .common import InfoExtractor from ..compat import compat_chr from ..utils import ( @@ -56,6 +58,12 @@ class OpenloadIE(InfoExtractor): 'only_matching': True, }] + @staticmethod + def _extract_urls(webpage): + return re.findall( + r'<iframe[^>]+src=["\']((?:https?://)?(?:openload\.(?:co|io)|oload\.tv)/embed/[a-zA-Z0-9-_]+)', + webpage) + def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage('https://openload.co/embed/%s/' % video_id, video_id) |