Closed ymyke closed 4 years ago
Thanks for reporting this :)
spotify.__version__
Got it. According to https://spotifypy.readthedocs.io/en/latest/quickstart.html: "Encode spaces with the hex code %20 or +."
So this works as expected:
client.search("Adventure%20Club", types=["artist"])
{'artists': [<spotify.Artist: "Adventure Club">,
<spotify.Artist: "Adventure Club">,
<spotify.Artist: "Ragtime Adventure Club">,
<spotify.Artist: "Super Adventure Club">,
<spotify.Artist: "Adventure Bathtub Club">,
<spotify.Artist: "Super Adventure Club">,
<spotify.Artist: "Admiral Spooks Aerial Adventure Club">]}
So my original issue is resolved.
Still, I'd suggest to mention this -- as well as the link to the readthedocs -- more prominently. The projects readme has very minimal info only and does not link to the readthedocs.
(I'm using v0.4.8, async.)
Adding to the above, encoding space with + did not work:
client.search("Adventure+Club", types=["artist"])
{'artists': []}
Got it. According to https://spotifypy.readthedocs.io/en/latest/quickstart.html: "Encode spaces with the hex code %20 or +."
The library handles encoding the search query for you.
Still, I'd suggest to mention this -- as well as the link to the readthedocs -- more prominently. The projects readme has very minimal info only and does not link to the readthedocs.
I agree the readme is a little bare, I'll work on making it more informative.
I am unable to reproduce the issue testing with sync on v0.5.0
In [1]: from spotify import sync, __version__
In [2]: print(__version__)
0.5.0
In [3]: client = sync.Client('foo', 'bar')
In [4]: client.search('Adventure Club', types=['artist'])
Out[4]:
{'artists': [<spotify.Artist: 'Adventure Club'>,
<spotify.Artist: 'Adventure Club'>,
<spotify.Artist: 'Ragtime Adventure Club'>,
<spotify.Artist: 'Super Adventure Club'>,
<spotify.Artist: 'Adventure Bathtub Club'>,
<spotify.Artist: 'Super Adventure Club'>,
<spotify.Artist: 'Admiral Spooks Aerial Adventure Club'>]}
I suggest updating the library to resolve your issue.
Yep, that did the job. Thanks for helping!
No problem!
Hi @mental32 -- thanks for the great module.
Stumbled upon this by accident:
1. Search for "Adventure Club" via search method yields empty list:
2. Whereas search for "Adventure" yields "Adventure Club" in top spot:
3. And: Using Spotify's API sandbox to issue the query in 1 also yields the correct results:
yields:
Do you have an idea what is going on here?
Thanks!