NeteaseCloudMusicFlac
NeteaseCloudMusicFlac copied to clipboard
Error "IndexError: string index out of range" when run python3_main.py code
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.
@neihousaigaai It's strange. The script runs good on my mac.(use your command).
Are u run the script on China?
I run the script in Vietnam.
http://zhangmenshiting.qianqian.com/data2/music/ac8e4420a3e58916cd51da9f200ee4db/326928437/326928368201600908.flac?xcode=4603ab8aab626dea26bdb4a8ac0cec0f
@neihousaigaai Could u try this link? Can u open it? Maybe the urls not work outside China.
I can open your link.
So what can I do?
@neihousaigaai I will give u next link.
@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
I received {"errorCode":22232,"data":{"xcode":"","songList":""}}
@neihousaigaai That means the music website don't support your country.
@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.
@neihousaigaai sry for the late reply.
Can't download