X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fopenload.py;h=cc323e5e21db25287e88d84e7b97e98e1e4da892;hb=04988b55b54bd7bd803d43a56f87e4728158890a;hp=bae7c7ee7145dec602514870710b5ba88263d24f;hpb=034f5fb5ee37e9edf90f7e82f48af985cdd17901;p=youtube-dl diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py index bae7c7ee7..cc323e5e2 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))' _VALID_URL = r'''(?x) https?:// (?P (?: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[a-zA-Z0-9-_]+) - ''' + ''' % _DOMAINS _TESTS = [{ 'url': 'https://openload.co/f/kUEfGclsU9o', @@ -359,8 +357,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)