Spotify XML 请求
我尝试执行 XMLHTTP 请求: http://lyricwiki.org/api.php?artist=” +encodeURIComponent(artistName) +”&song=”+encodeURIComponent(songName) +”&fmt=xml
获取歌词 但是当我查看 Spotify 检查器时,请求状态为 0 我能做些什么?
I try to do a XMLHTTPrequest to: http://lyricwiki.org/api.php?artist=" + encodeURIComponent(artistName) + "&song=" + encodeURIComponent(songName) + "&fmt=xml
to get the lyrics
but when I look in the inspector Spotify the request status is 0
what can I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更完整的代码帖子会有所帮助。但我会用最简单的测试示例来尝试一下。
在
manifest.json
中需要此权限:重要提示:确保
manifest.json
文件仅使用正确的\n
进行 utf-8 编码换行符,并使用 JSON linter 来验证其格式是否正确 (http://jsonlint.com/)另外,请务必在对
manifest.json
进行任何更改后重新启动 Spotify 客户端。这个简单的例子对我有用:
A fuller post of your code would help. But I will give this a shot with simplest tested example.
Require this permission in your
manifest.json
:IMPORTANT: Make sure the
manifest.json
file is utf-8 encoded with the proper\n
only line breaks, and use a JSON linter to verify it is well formatted (http://jsonlint.com/)Also, Be sure to restart the Spotify client after any changes to
manifest.json
.This simple example worked for me: