sk1418 / zhuaxia

download mp3 files/albums from xiami.com and music.163.com
Other
410 stars 83 forks source link

登录失败而且不能解析 #44

Closed m274d closed 8 years ago

m274d commented 8 years ago

非常感谢您的软件,不知道为什么我在设置之后还是不太行,作为一个新手前来求教!

运行环境:Vmware 11.1 x64 ubuntu 14.04

我正常设置账户密码后: xiami.auth.email = xxxxx@126.com xiami.auth.password = xxxx

运行: zx http://www.xiami.com/song/1776111922

返回:

WARNING: [虾] 不登录虾米进行下载, 虾米资源质量为128kbps. ERROR: [虾]无法解析/下载歌曲链接: [http://www.xiami.com/song/1776111922] Traceback (most recent call last): File "/usr/local/bin/zx", line 5, in pkg_resources.run_script('zhuaxia==3.1.0', 'zx') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/EGG-INFO/scripts/zx", line 122, in commander.shall_I_begin(option) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/commander.py", line 68, in shall_I_begin from_url_xm(xiami_obj, option.inUrl) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/commander.py", line 175, in from_url_xm song = xm.XiamiSong(xm_obj, url=url) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/xiami.py", line 64, in init jsong = self.handler.read_link(url_song % self.song_id).json()['data']['trackList'][0] File "/usr/lib/python2.7/dist-packages/requests/models.py", line 741, in json return json.loads(self.text, kwargs) File "/usr/lib/python2.7/json/init**.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

考虑到不在大陆,我又试了 china.proxy.http=114.215.191.207:80

返回:

WARNING: [虾] 不登录虾米进行下载, 虾米资源质量为128kbps. ERROR: [虾]无法解析/下载歌曲链接: [http://www.xiami.com/song/1776111922] Traceback (most recent call last): File "/usr/local/bin/zx", line 5, in pkg_resources.run_script('zhuaxia==3.1.0', 'zx') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/EGG-INFO/scripts/zx", line 122, in commander.shall_I_begin(option) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/commander.py", line 68, in shall_I_begin from_url_xm(xiami_obj, option.inUrl) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/commander.py", line 175, in from_url_xm song = xm.XiamiSong(xm_obj, url=url) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/xiami.py", line 67, in init LOG.debug(self.handler.read_link(url_song % self.song_id).text) File "/usr/local/lib/python2.7/dist-packages/zhuaxia-3.1.0-py2.7.egg/zhuaxia/xiami.py", line 398, in read_link retVal = requests.get(link, headers=headers, proxies=requests_proxy) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 55, in get return request('get', url, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request return session.request(method=method, url=url, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request resp = self.send(prep, _send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send r = adapter.send(request, _kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 305, in send conn = self.get_connection(request.url, proxies) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 206, in get_connection except_on_missing_scheme(proxy) File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 636, in except_on_missing_scheme raise MissingSchema('Proxy URLs must have explicit schemes.') requests.exceptions.MissingSchema: Proxy URLs must have explicit schemes.

期待您能不吝赐教!再次谢谢!

sk1418 commented 8 years ago
m274d commented 8 years ago

感谢您的及时回复!

  1. 很有可能是不在大陆的问题(我也不在……),这个有点没办法了……
  2. requests库已经升级到最新,应该不是这个问题。不过我再检查一下! 3, 我直接下载了release里的版本,我去克隆一个新再测试一下!

PS:虾米在7月初又改了音乐存储方式,目前其他的网站解析都是得到 http://om192.alicdn.com/ 开头的192k音乐,不知道您的版本有无更新策略?

sk1418 commented 8 years ago
m274d commented 8 years ago

非常抱歉我没有在我测试之后再回复您,对此我深表歉意,浪费了您宝贵的时间。 下面是测试结果。

  1. 更新3.1.2版本后,可以正常登陆。vip账号可以无需vpn下载歌曲,以下是运行结果

zx -H http://www.xiami.com/song/1776111922

[虾] 登录虾米... /usr/local/lib/python2.7/dist-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. SNIMissingWarning /usr/local/lib/python2.7/dist-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning /usr/local/lib/python2.7/dist-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) [虾][Login] 用户: xxx (id:xxxx) 登录成功. 解析: "[虾] song/1776111922" ..... [曲目] Walküre Attack! 下载任务总数: 1 3秒后开始下载

  1. 将requests更新到2.10.0之后可以正常使用代理。非常抱歉由于之前我更新requests没有留意到他显示 owned by OS 而没有实际性更新。在手动升级后可以使用代理。
  2. 目前确实无法解析部分320K音质歌曲。就以我下载的这首歌曲为例。通过zhuaxia下载的是4.7M的128K MP3文件。通过VIP积分下载得到的是高品质文件。

再次向您表示感谢!希望能对您的后续开发有所帮助。

sk1418 commented 8 years ago

不用客气... 那是不是说问题解决了?

至于320k的HQ音源, 我确实无能为力了. 我没有vip账号, 也就没办法进一步调试了.... 还是先基于免费版本的吧.

如果你觉得问题都解决了, 请close issue. 如果还有程序上的问题, 请详细指出我尽量测试解决.

至于这个https warning, 有时间我看看, 问题是我修改了也不好测试.....

m274d commented 8 years ago

谢谢您!暂时没问题了~

(您可以给我一个您的uid,就是个人主页的这串 http://www.xiami.com/u/xxxxxxx , 我赠送给您3个月来测试~

sk1418 commented 8 years ago

@m274d 谢谢你.. 目前我进不去个人主页....哈哈.. 不过也没仔细折腾. 等我想搞xiami vip的时候, 再求助你. 另外, 不必用尊称.