Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

输出貌似语法错误 #8

Open
HuLian21 opened this issue Feb 10, 2018 · 11 comments
Open

输出貌似语法错误 #8

HuLian21 opened this issue Feb 10, 2018 · 11 comments

Comments

@HuLian21
Copy link

File "python2.py", line 7

^
SyntaxError: invalid syntax

python版本 2.7
请问如何解决呢

@bjason
Copy link
Owner

bjason commented Feb 12, 2018

您试一下AlternativeMethodForPy2.py呢?
我电脑也是python2.7 成功运行啊…

@HuLian21
Copy link
Author

输出成功,可是。。只有一首歌

@HuLian21
Copy link
Author

python3

@bjason
Copy link
Owner

bjason commented Feb 23, 2018

@HuLian21 昂 什么意思 是python2还是python3
py2的话AlternativeMethodForPy2.py应该是没问题的

@jeffchrist
Copy link

同样,输出的txt只有歌单的第一首歌

@HuLian21
Copy link
Author

HuLian21 commented Mar 2, 2018

是的 PY3 PY2的都可以成功,只是只有一首歌

@bjason
Copy link
Owner

bjason commented Mar 2, 2018

python2.py和python3.py这两个是用的官方的API,最近在抽风,输出是只有一首歌的。AlternativeMethodForPy2.py换了别人的API,我个人是可以使用的,而且输出的是完整的歌单。
如果你们尝试用AlternativeMethodForPy2.py还是一样的话,如果方便可以留下你们使用的歌单ID吗?

@HuLian21
Copy link
Author

那个AlternativeMethodForPy2.py貌似有点小问题,同样的ID, 其他脚本获取得到,这个获取不到
另外出现这个问题
Traceback (most recent call last):
File "C:\Users\USER\Desktop\AlternativeMethodForPy2.py", line 50, in
trackName = track["title"]
TypeError: string indices must be integers

id=128949764

@bjason
Copy link
Owner

bjason commented Mar 12, 2018

@HuLian21 alternative那个方法是因为API更新了出的错,现在已经适配了,你可以重新试一下。但是因为是第三方API,貌似太长的歌单和隐藏的播放列表是不可以获取的…我去问问API的开发者吧😊
而python2和python3两个文件只输出一首歌是因为网易云API的问题,这个暂时无解…

@fantasylidong
Copy link

无论哪个都只有一首歌

@leon332157
Copy link

@bjason 加一个随机UA就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants