From 0d8a0cefc1e180d6628d0f2cc10a104a5727094f Mon Sep 17 00:00:00 2001 From: Laura Liberda Date: Thu, 10 Dec 2020 03:23:01 +0100 Subject: [PATCH] fix suitable_selfhosted() on extractors with no regexes --- haruhi_dl/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haruhi_dl/extractor/common.py b/haruhi_dl/extractor/common.py index 86ea141fc..1fea16398 100644 --- a/haruhi_dl/extractor/common.py +++ b/haruhi_dl/extractor/common.py @@ -3078,7 +3078,7 @@ class SelfhostedInfoExtractor(InfoExtractor): # no strings? check regexes! if '_SH_CONTENT_REGEXES_RES' not in cls.__dict__: cls._SH_VALID_CONTENT_REGEXES_RES = (re.compile(rgx) - for rgx in cls._SH_VALID_CONTENT_REGEXES) + for rgx in cls._SH_VALID_CONTENT_REGEXES or ()) if not any(rgx.match(webpage) is not None for rgx in cls._SH_VALID_CONTENT_REGEXES_RES): return False