Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
819 views
in Technique[技术] by (71.8m points)

search - Spotify API and Apostrophe vs Footmark

Using the Spotify API, I'm doing a search for Bj?rk - I've Seen It All.

Note that my goal is to accommodate for tracks non-uniformly stored with apostrophes i’ve versus footmarks i've

In the q * field, I've entered the following:

  • bj?rk "I've seen it all" (works, but only single word artists)
  • "bj?rk" "I've seen it all" (works, but only single word artists)
  • artist:"Bj?rk" track:"Seen it all" (works, note no I've/I’ve)
  • artist:"Bj?rk" track:"I’ve seen" (fails)
  • artist:"Bj?rk" track:"I've seen" (fails)
  • artist:"Bj?rk" track:"i’ve seen" OR "i've seen" (definitely fails)
  • artist:"Bj?rk" track:"i’ve seen"%20OR%20"i've seen" (definitely fails)

This one works, but not for Bj?rk:

  • artist:"Jimmy Barnes" track:"I’ve seen it all" OR "I've seen it all"

Another Example: Drake - Can't Take A Joke

  • Can't Take A Joke (works)
  • Can’t Take A Joke (works)
  • "Can’t Take A Joke" OR "Can't Take A Joke" (works great!)
  • track:"Can’t Take A Joke" OR "Can't Take A Joke" (works great!)
  • artist:"Drake" track:"Can’t Take A Joke" OR "Can't Take A Joke" (ideal!)

I was thinking that it could be related to the accented character in Bj?rk, however I'm still getting successful searches, but not when it's combined with the apostrophe/footmark search.

Have others experienced this difficult with the Spotify API? If you have, what process has given you consistently successful search results?


Interesting side note:

  • artist:"bj?rk" I've seen it all OR I’ve seen it all (works)
  • artist:"bj?rk" "I've seen it all" OR "I’ve seen it all" (works)

However it also returns OTHER songs by that artist, so it's not strict enough.


Similar question, but different enough where it doesn't help: Spotify Web API special characters

question from:https://stackoverflow.com/questions/65908215/spotify-api-and-apostrophe-vs-footmark

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...