Skip to content

Commit

Permalink
fix: spotify regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tristiisch committed Dec 6, 2024
1 parent 67b7c41 commit 10011b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyramid/services/spotify_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async def get_by_url(

@classmethod
def extract_from_url(cls, url) -> tuple[str, SpotifyType | None] | tuple[None, None]:
pattern = r"^(?:https?:\/\/)?(?:www\.)?open\.spotify\.com\/(?:\w{2}\/)?(?P<type>\w+)\/(?P<id>\w+)"
pattern = r"^(?:https?:\/\/)?(?:www\.)?open\.spotify\.com\/(?:intl-\w+\/)?(?:\w+\/)?(?P<type>\w+)\/(?P<id>\w+)"
match = re.search(pattern, url)
if not match:
return None, None
Expand Down

0 comments on commit 10011b5

Please sign in to comment.