bjason / 163musictospotify Goto Github PK
View Code? Open in Web Editor NEWConvert your favorite 163 music playlist to Spotify
Home Page: https://bjason.github.io/163MusicToSpotify/
Convert your favorite 163 music playlist to Spotify
Home Page: https://bjason.github.io/163MusicToSpotify/
I had this issue using Python 3.5.5 on Windows 10 1803. However, I managed to find a possible solution to this.
Here's the traceback:
Traceback (most recent call last):
File "AlternativeMethodForPy3.py", line 36, in
data = json.loads(response)
File "C:\Users*\Anaconda3\envs******\lib\json_init_.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'
Can be solved by adding ".decode('utf-8')" at the end of line 35.
response = urllib.request.urlopen(req, encodedContent).read().decode('utf-8')
用python运行的时候 出现这样
Traceback (most recent call last):
File "\Mac\Home\Desktop\163MusicToSpotify-master\t.py", line 7, in
response = urllib.urlopen(url)
AttributeError: module 'urllib' has no attribute 'urlopen'
请问如何解决
只能导出歌单的第一首歌,是不是缺少循环?浅见,期待修复
Python 版本
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "AlternativeMethodForPy2.py", line 57, in
with open(playlistName + ".txt", "w", encoding="utf-8") as file:
TypeError: 'encoding' is an invalid keyword argument for this function
怎么办呢
增加UA
File "python2.py", line 7
^
SyntaxError: invalid syntax
python版本 2.7
请问如何解决呢
运行了一下代码以后发现只输出了第一首歌的信息,所以我就输出了一下那个dict文件,发现这个API只有第一首歌,该怎么解决呢?
请问怎么解决?
C:\Users\sy21d\Downloads\163MusicToSpotify-master>py AlternativeMethodForPy3.py
===== Get tracks of your 163 playlist =====
Enter the playlist id (Enter ? to get help):318339843
Traceback (most recent call last):
File "AlternativeMethodForPy3.py", line 48, in
tracks = body["songs"]
KeyError: 'songs'
emmm 能不能麻烦看下这是什么问题。。。
===== Get tracks of your 163 playlist =====
Enter the playlist id (Enter ? to get help):545401964
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\AlternativeMethodForPy2.py", line 37, in
response = urllib2.urlopen(req, encodedContent).read()
File "H:\python2.7\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "H:\python2.7\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "H:\python2.7\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "H:\python2.7\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "H:\python2.7\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "H:\python2.7\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
黑人问号?网上查了下如何运行py后终于可以运行了,但是提示成功后却没看到txt文件,请问哪里出错了?
appledembp-4:~ apple$ python /Users/apple/Desktop/t/python2.py
Enter the playlist id (Enter ? to get help):28549931
Success.
Check the directory of this file and find the .kgl file!
Enter the playlist id (Enter ? to get help):?
https://yyrcd.com/2018/11/14/n2s-zh/
根据作者的代码,上个学期做了web实现,用起来会比脚本方便点。
repo地址:https://github.com/yueyericardo/Netease-to-Youtube-or-Spotify
嗯……估计是网易云API又抽了……
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.