Spotipy:搜索具有非英语名称的曲目
我目前正在跟踪根据歌曲和艺术家名称查找曲目的ID。我正在使用API和Spotify库(可以在此处找到: https://pypi.org/project/ Spotify/)。
这是一个例子:
- 我想搜索这首歌。这首歌的名称称为gee,由소녀시대演唱。请注意,艺术家的名字是韩语,但用英语为女子,被称为女孩的一代。
当我使用术语“ gee소녀시대”一词在Spotify上搜索此内容时,以下结果按预期弹出。
但是,如果我使用以下代码在Python上搜索此信息,则会弹出以下错误。
sp.search(q='artist:' + '소녀시대' + ' track:' + 'Gee', type='track')
无论如何我是否有搜索以使结果按预期显示?
I am currently tracking to look up a track's ID based on the song and artist name. I am using the api and spotify library (which can be found here: https://pypi.org/project/spotify/).
Here is an example:
- I want to search for this song. The name of this song is called Gee and is sung by 소녀시대. Notice the artist name is in Korean, but in English they are known as Girl's Generation.
When I search for this on spotify using the term "Gee 소녀시대", the following results pop up as expected.
However, If i were to use the following code to search for this on python, the following error pops up.
sp.search(q='artist:' + '소녀시대' + ' track:' + 'Gee', type='track')
Is there anyway for me to search such that the result shows up as expected?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
播放代码,实际上只需要一个非常简单的解决方案
Played around with the code and it actually just requires a very simple solution