projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[openload] Add support for oladblock domains (#20471)
[youtube-dl]
/
youtube_dl
/
extractor
/
openload.py
diff --git
a/youtube_dl/extractor/openload.py
b/youtube_dl/extractor/openload.py
index bae7c7ee7145dec602514870710b5ba88263d24f..da9c721d2b4fa8411f28c119dd3230a3dafa88d5 100644
(file)
--- a/
youtube_dl/extractor/openload.py
+++ b/
youtube_dl/extractor/openload.py
@@
-243,18
+243,16
@@
class PhantomJSwrapper(object):
class OpenloadIE(InfoExtractor):
class OpenloadIE(InfoExtractor):
+ _DOMAINS = r'(?:openload\.(?:co|io|link|pw)|oload\.(?:tv|stream|site|xyz|win|download|cloud|cc|icu|fun|club|info|pw|live|space)|oladblock\.(?:services|xyz|me))'
_VALID_URL = r'''(?x)
https?://
(?P<host>
(?:www\.)?
_VALID_URL = r'''(?x)
https?://
(?P<host>
(?:www\.)?
- (?:
- openload\.(?:co|io|link|pw)|
- oload\.(?:tv|stream|site|xyz|win|download|cloud|cc|icu|fun|club|info|pw|live|space)
- )
+ %s
)/
(?:f|embed)/
(?P<id>[a-zA-Z0-9-_]+)
)/
(?:f|embed)/
(?P<id>[a-zA-Z0-9-_]+)
- '''
+ '''
% _DOMAINS
_TESTS = [{
'url': 'https://openload.co/f/kUEfGclsU9o',
_TESTS = [{
'url': 'https://openload.co/f/kUEfGclsU9o',
@@
-352,6
+350,15
@@
class OpenloadIE(InfoExtractor):
}, {
'url': 'https://oload.space/f/IY4eZSst3u8/',
'only_matching': True,
}, {
'url': 'https://oload.space/f/IY4eZSst3u8/',
'only_matching': True,
+ }, {
+ 'url': 'https://oladblock.services/f/b8NWEgkqNLI/',
+ 'only_matching': True,
+ }, {
+ 'url': 'https://oladblock.xyz/f/b8NWEgkqNLI/',
+ 'only_matching': True,
+ }, {
+ 'url': 'https://oladblock.me/f/b8NWEgkqNLI/',
+ 'only_matching': True,
}]
_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
}]
_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
@@
-359,8
+366,8
@@
class OpenloadIE(InfoExtractor):
@staticmethod
def _extract_urls(webpage):
return re.findall(
@staticmethod
def _extract_urls(webpage):
return re.findall(
- r'<iframe[^>]+src=["\']((?:https?://)?
(?:openload\.(?:co|io)|oload\.tv)/embed/[a-zA-Z0-9-_]+)',
- webpage)
+ r'<iframe[^>]+src=["\']((?:https?://)?
%s/embed/[a-zA-Z0-9-_]+)'
+
% OpenloadIE._DOMAINS,
webpage)
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)