[common] use f-string in BaseExtractor.update()
This commit is contained in:
@@ -1028,10 +1028,8 @@ class BaseExtractor(Extractor):
|
|||||||
pattern = re.escape(root[root.index(":") + 3:])
|
pattern = re.escape(root[root.index(":") + 3:])
|
||||||
pattern_list.append(pattern + "()")
|
pattern_list.append(pattern + "()")
|
||||||
|
|
||||||
return (
|
return (f"(?:{cls.basecategory}:(https?://[^/?#]+)|"
|
||||||
r"(?:" + cls.basecategory + r":(https?://[^/?#]+)|"
|
f"(?:https?://)?(?:{'|'.join(pattern_list)}))")
|
||||||
r"(?:https?://)?(?:" + "|".join(pattern_list) + r"))"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class RequestsAdapter(HTTPAdapter):
|
class RequestsAdapter(HTTPAdapter):
|
||||||
|
|||||||
Reference in New Issue
Block a user