Merge pull request #420 from ritiek/fix-split-http-url

Trim '?<key>' when extracting ID from HTTP URLs
This commit is contained in:
Ritiek Malhotra 2020-01-13 07:09:31 -08:00 committed by GitHub
commit 9c5b9c068f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fixed inconsistent behaviour with some API methods when
a full HTTP URL is passed.
### Changed
- Fixed invalid calls to logging warn method
- `mock` no longer needed for install. Only used in `tox`.

View File

@ -1128,7 +1128,7 @@ class Spotify(object):
if type != itype:
self._warn('expected id of type %s but found type %s %s' %
(type, itype, id))
return fields[-1]
return fields[-1].split('?')[0]
return id
def _get_uri(self, type, id):