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

Error "IndexError: string index out of range" when run python3_main.py code #29

Open
neihousaigaai opened this issue Feb 8, 2018 · 11 comments
Labels

Comments

@neihousaigaai
Copy link

I tried

python3 python3_main.py 'http://music.163.com/#/album?id=34738495'

and I received an error:

fetching msg from http://music.163.com/#/album?id=34738495

路远
find songid: 74223488
Traceback (most recent call last):
  File "python3_main.py", line 48, in <module>
    songlink = d["data"]["songList"][0]["songLink"]
IndexError: string index out of range

I don't receive any errors when I run main.py code. I don't know why.

@atlas-comstock
Copy link
Owner

@neihousaigaai
It's strange.
The script runs good on my mac.(use your command).

Are u run the script on China?

@neihousaigaai
Copy link
Author

I run the script in Vietnam.

@atlas-comstock
Copy link
Owner

@neihousaigaai
Copy link
Author

I can open your link.

So what can I do?

@atlas-comstock
Copy link
Owner

@neihousaigaai I will give u next link.

@atlas-comstock
Copy link
Owner

atlas-comstock commented Feb 11, 2018

@neihousaigaai Try this link, and if you can open it, paste its content here.
http://music.baidu.com/data/music/fmlink?songIds=74223488&type=flac

@neihousaigaai
Copy link
Author

I received {"errorCode":22232,"data":{"xcode":"","songList":""}}

@atlas-comstock
Copy link
Owner

@neihousaigaai That means the music website don't support your country.

@atlas-comstock
Copy link
Owner

@neihousaigaai hi, You can use http://imfangli.github.io/baidu-music-downloader/ this to search for FLAC, if you only want to download a few songs.

@atlas-comstock
Copy link
Owner

@neihousaigaai sry for the late reply.

@pauladeanda111
Copy link

Can't download
untitled

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

No branches or pull requests

3 participants