From a224e2323550990d7338bd35b3c2c4f245108454 Mon Sep 17 00:00:00 2001 From: Tristiisch Date: Mon, 25 Mar 2024 00:16:06 +0100 Subject: [PATCH] Fix: regex spotify url --- src/pyramid/connector/spotify/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyramid/connector/spotify/search.py b/src/pyramid/connector/spotify/search.py index aa7ca48..afaa944 100644 --- a/src/pyramid/connector/spotify/search.py +++ b/src/pyramid/connector/spotify/search.py @@ -235,7 +235,7 @@ class SpotifyType(Enum): class SpotifyTools(AEngineTools): def extract_from_url(self, url) -> tuple[str, SpotifyType | None] | tuple[None, None]: # Extract ID and type using regex - pattern = r"(?<=open.spotify.com/)(intl-(?P\w+)/)?(?P\w+)/(?P\w+)" + pattern = r"(?<=open\.spotify\.com/)(intl-(?P\w+)/)?(?P\w+)/(?P\w+)" match = re.search(pattern, url) if not match: return None, None