0xHJK / music-dl

search and download music 从网易云音乐、QQ音乐、酷狗音乐、百度音乐、虾米音乐、咪咕音乐等搜索和下载歌曲
MIT License
3.8k stars 548 forks source link

[BUG]JSON解析问题 #22

Open chonghai opened 5 years ago

chonghai commented 5 years ago

问题描述(Question description) 提交issue前,请先检查是否是最新的代码、环境是否符合要求、依赖是否安装完整 请尽可能填写完整以下信息,方便排查问题,填写不完整可能不会受理 解决问题后请关闭issue,谢谢

使用的环境(Environment)

截图 使用-v参数运行,截取完整错误信息 Run with the -v parameter to get the full error message

Traceback (most recent call last): File "d:\dev\python37\lib\threading.py", line 917, in _bootstrap_inner self.run() File "d:\dev\python37\lib\threading.py", line 865, in run self._target(*self._args, self._kwargs) File "d:\dev\python37\lib\site-packages\music_dl\extractors\xiami.py", line 88, in xiami_music_info mj = mr.json() File "d:\dev\python37\lib\site-packages\requests\models.py", line 897, in json return complexjson.loads(self.text, kwargs) File "d:\dev\python37\lib\json__init__.py", line 348, in loads return _default_decoder.decode(s) File "d:\dev\python37\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "d:\dev\python37\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 2)

修改建议 建议加一个生成log的参数,方便上传错误信息

0xHJK commented 5 years ago

检查了一下应该是虾米音乐的API升级了,需要修改代码。在此之前可以先屏蔽虾米的搜索

music-dl -s "qq baidu netease flac kugou"