Skip to content

Commit

Permalink
Merge pull request #420 from ritiek/fix-split-http-url
Browse files Browse the repository at this point in the history
Trim '?<key>' when extracting ID from HTTP URLs
  • Loading branch information
ritiek authored Jan 13, 2020
2 parents 4ec3207 + e6829a1 commit 9c5b9c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion spotipy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ def _get_id(self, type, id):
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):
Expand Down

0 comments on commit 9c5b9c0

Please sign in to comment.