X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fopenload.py;h=b441bd6bafda5ae022f9dde96cbea679e3e4dc46;hb=f114e43d3845b13227d4a1251bfb7d2750e76032;hp=747aa298ab5f6aa6d6b6c84877929bcd5d88a496;hpb=15e832ff2a1bee42b299d3498439cf789c16fffa;p=youtube-dl.git diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index 747aa298a..b441bd6ba 100644 --- a/youtube_dl/extractor/openload.py +++ b/youtube_dl/extractor/openload.py @@ -243,18 +243,16 @@ class PhantomJSwrapper(object): 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 (?:www\.)? - (?: - openload\.(?:co|io|link)| - oload\.(?:tv|stream|site|xyz|win|download|cloud|cc|icu|fun|club|info) - ) + %s )/ (?:f|embed)/ (?P[a-zA-Z0-9-_]+) - ''' + ''' % _DOMAINS _TESTS = [{ 'url': 'https://openload.co/f/kUEfGclsU9o', @@ -340,6 +338,24 @@ class OpenloadIE(InfoExtractor): }, { 'url': 'https://oload.info/f/5NEAbI2BDSk', 'only_matching': True, + }, { + 'url': 'https://openload.pw/f/WyKgK8s94N0', + 'only_matching': True, + }, { + 'url': 'https://oload.pw/f/WyKgK8s94N0', + 'only_matching': True, + }, { + 'url': 'https://oload.live/f/-Z58UZ-GR4M', + '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, }] _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' @@ -347,8 +363,8 @@ class OpenloadIE(InfoExtractor): @staticmethod def _extract_urls(webpage): return re.findall( - r']+src=["\']((?:https?://)?(?:openload\.(?:co|io)|oload\.tv)/embed/[a-zA-Z0-9-_]+)', - webpage) + r']+src=["\']((?:https?://)?%s/embed/[a-zA-Z0-9-_]+)' + % OpenloadIE._DOMAINS, webpage) def _real_extract(self, url): mobj = re.match(self._VALID_URL, url)