Skip to content

Commit

Permalink
Fix: regex spotify url
Browse files Browse the repository at this point in the history
  • Loading branch information
tristiisch committed Mar 24, 2024
1 parent 20ceb05 commit a224e23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyramid/connector/spotify/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<intl>\w+)/)?(?P<type>\w+)/(?P<id>\w+)"
pattern = r"(?<=open\.spotify\.com/)(intl-(?P<intl>\w+)/)?(?P<type>\w+)/(?P<id>\w+)"
match = re.search(pattern, url)
if not match:
return None, None
Expand Down

0 comments on commit a224e23

Please sign in to comment.