diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e6684e4..b9c96396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * Added `RedisCacheHandler`, a cache handler that stores the token info in Redis. +* Changed URI handling in `client.Spotify._get_id()` to remove qureies if provided by error. ## [2.19.0] - 2021-08-12 diff --git a/spotipy/client.py b/spotipy/client.py index d018a578..4ad4b2d9 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -1913,7 +1913,7 @@ def _get_id(self, type, id): if type != fields[-2]: logger.warning('Expected id of type %s but found type %s %s', type, fields[-2], id) - return fields[-1] + return fields[-1].split("?")[0] fields = id.split("/") if len(fields) >= 3: itype = fields[-2]