From 27a45deb6e2c1a37371f69133ffe5f6834741f9b Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 7 Apr 2024 14:22:56 -0400 Subject: [PATCH] only parse 302 for known hosts eg spotify.link --- catalog/common/sites.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog/common/sites.py b/catalog/common/sites.py index 3c447e77..07d42dea 100644 --- a/catalog/common/sites.py +++ b/catalog/common/sites.py @@ -298,7 +298,7 @@ class SiteManager: cls = next( filter(lambda p: p.validate_url(url), SiteManager.registry.values()), None ) - if cls is None: + if cls is None and re.match(r"^https?://(spotify.link|t.co).+", url): try: url2 = requests.head(url, allow_redirects=True, timeout=1).url if url2 != url: