mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
* Fix regex to support detailed URI as #947 * Added changes to changelog
This commit is contained in:
parent
ca332a538e
commit
f2d23e2219
@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Fixed the regex for matching playlist URIs with the format spotify:user:USERNAME:playlist:PLAYLISTID.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class Spotify(object):
|
|||||||
#
|
#
|
||||||
# [1] https://www.iana.org/assignments/uri-schemes/prov/spotify
|
# [1] https://www.iana.org/assignments/uri-schemes/prov/spotify
|
||||||
# [2] https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids
|
# [2] https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids
|
||||||
_regex_spotify_uri = r'^spotify:(?P<type>track|artist|album|playlist|show|episode|user):(?P<id>[0-9A-Za-z]+)$' # noqa: E501
|
_regex_spotify_uri = r'^spotify:(?:(?P<type>track|artist|album|playlist|show|episode):(?P<id>[0-9A-Za-z]+)|user:(?P<username>[0-9A-Za-z]+):playlist:(?P<playlistid>[0-9A-Za-z]+))$' # noqa: E501
|
||||||
|
|
||||||
# Spotify URLs are defined at [1]. The assumption is made that they are all
|
# Spotify URLs are defined at [1]. The assumption is made that they are all
|
||||||
# pointing to open.spotify.com, so a regex is used to parse them as well,
|
# pointing to open.spotify.com, so a regex is used to parse them as well,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user