zhang435 / Music-Porter

Having trouble about import Xiami playlist into Spotify? This is the application you looking for!!
https://still-brushlands-47642.herokuapp.com/
MIT License
120 stars 14 forks source link

运行不成功 #2

Closed wongwenlei closed 6 years ago

wongwenlei commented 7 years ago
Traceback (most recent call last):
  File "main.py", line 101, in <module>
    move.start()
  File "main.py", line 31, in start
    songs = user.fetch_faviort()
  File "/Users/Willei/Downloads/Xiami_To_Spotify-master/Login_Fetch_Xiami.py", line 98, in fetch_faviort
    result = sp.search(q='artist:' + to_utf8(artist_name), type='artist')
  File "/Library/Python/2.7/site-packages/spotipy/client.py", line 339, in search
    return self._get('search', q=q, limit=limit, offset=offset, type=type, market=market)
  File "/Library/Python/2.7/site-packages/spotipy/client.py", line 146, in _get
    return self._internal_call('GET', url, payload, kwargs)
  File "/Library/Python/2.7/site-packages/spotipy/client.py", line 124, in _internal_call
    headers=r.headers)
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/search?q=artist%3A%E7%AA%A6%E9%9D%96%E7%AB%A5&type=artist&limit=10&offset=0:
 No token provided

请问是接口失效了吗,还是我操作有误?

zhang435 commented 7 years ago

搜了下 explain。 我估计这就是原因,Spotify 的api跟新了,具体可以参考new_api. 不清楚spotipy有没有跟着更新。。

懒。。不是很想更新。。。你要是能用新api就改下吧。。。。thx

wongwenlei commented 7 years ago

好的,我摸索着试试看,虽然也我不太会Python,谢谢回复

On 2017年9月5日 +0800 AM10:50, Jiawei Zhang notifications@github.com, wrote:

搜了下 explain。 我估计这就是原因,Spotify 的api跟新了,具体可以参考new_api. 不清楚spotipy有没有跟着更新。。 懒。。不是很想更新。。。你要是能用新api就改下吧。。。。thx — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

zhang435 commented 7 years ago

只要跟新 Login_Fetch_Xiami.py | line 98 , 这一段有个用了 sp.search(...),看看 新api要求所有search都需要 token, 看下spotipy有没有做新的函数,有的话直接拿下来用就行。。要是还不行再说,等段时间我把这修一下。。。你要是能修当然最好~

zhang435 commented 7 years ago

好了,spotipy已经停止更新一年了,这app是不能用了。。。。。。

wongwenlei commented 7 years ago

好吧,谢谢提醒。不知道还有没有其他方法,原来用过iOS上的workflow转过网易云的,但是只把歌手转成了歌单列表,歌曲到没转过去。

On 2017年9月5日 +0800 AM11:11, Jiawei Zhang notifications@github.com, wrote:

好了,spotipy已经停止更新一年了,这app是不能用了。。。。。。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

zhang435 commented 6 years ago

你好,我用node重新写了个网页版的,请试试~

wongwenlei commented 6 years ago

十分感谢,测试可用,辛苦啦