diff --git a/zotify/utils.py b/zotify/utils.py index dce9fd2..cb98af6 100644 --- a/zotify/utils.py +++ b/zotify/utils.py @@ -158,42 +158,42 @@ def regex_input_for_urls(search_input) -> Tuple[str, str, str, str, str, str]: track_uri_search = re.search( r'^spotify:track:(?P[0-9a-zA-Z]{22})$', search_input) track_url_search = re.search( - r'^(https?://)?open\.spotify\.com/track/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', + r'^(https?://)?open\.spotify\.com(?:/intl-\w+)?/track/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', search_input, ) album_uri_search = re.search( r'^spotify:album:(?P[0-9a-zA-Z]{22})$', search_input) album_url_search = re.search( - r'^(https?://)?open\.spotify\.com/album/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', + r'^(https?://)?open\.spotify\.com(?:/intl-\w+)?/album/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', search_input, ) playlist_uri_search = re.search( r'^spotify:playlist:(?P[0-9a-zA-Z]{22})$', search_input) playlist_url_search = re.search( - r'^(https?://)?open\.spotify\.com/playlist/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', + r'^(https?://)?open\.spotify\.com(?:/intl-\w+)?/playlist/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', search_input, ) episode_uri_search = re.search( r'^spotify:episode:(?P[0-9a-zA-Z]{22})$', search_input) episode_url_search = re.search( - r'^(https?://)?open\.spotify\.com/episode/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', + r'^(https?://)?open\.spotify\.com(?:/intl-\w+)?/episode/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', search_input, ) show_uri_search = re.search( r'^spotify:show:(?P[0-9a-zA-Z]{22})$', search_input) show_url_search = re.search( - r'^(https?://)?open\.spotify\.com/show/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', + r'^(https?://)?open\.spotify\.com(?:/intl-\w+)?/show/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', search_input, ) artist_uri_search = re.search( r'^spotify:artist:(?P[0-9a-zA-Z]{22})$', search_input) artist_url_search = re.search( - r'^(https?://)?open\.spotify\.com/artist/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', + r'^(https?://)?open\.spotify\.com(?:/intl-\w+)?/artist/(?P[0-9a-zA-Z]{22})(\?si=.+?)?$', search_input, )