PeterDing / iScript

各种脚本 -- 关于 虾米 xiami.com, 百度网盘 pan.baidu.com, 115网盘 115.com, 网易音乐 music.163.com, 百度音乐 music.baidu.com, 360网盘/云盘 yunpan.cn, 视频解析 flvxz.com, bt torrent ↔ magnet, ed2k 搜索, tumblr 图片下载, unzip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[pan.baidu.com.py]save_share时出现错误

jumpx1 opened this issue · comments

Hi,你好

目前通过save_share接口,如出现
infos = self._get_share_infos(url, remotepath, infos)
File "baidu.py", line xxxx, in _get_share_infos
self.shareid = info['shareid']
KeyError: 'shareid'
没有shareid

能把出错的 url 发出来看看吗

我测试命令如下:
bp save http://pan.baidu.com/s/1c2mqPQ4 /123 -s teci
Traceback (most recent call last):
File "/bin/pan.baidu.com.py", line 3825, in
main(argv)
File "/bin/pan.baidu.com.py", line 3821, in main
handle_command(comd, xxx)
File "/bin/pan.baidu.com.py", line 3534, in handle_command
x.save_share(url, remotepath, infos=infos)
File "/bin/pan.baidu.com.py", line 1650, in save_share
infos = self._get_share_infos(url, remotepath, infos)
File "/bin/pan.baidu.com.py", line 1614, in _get_share_infos
self.shareid = info['shareid']
KeyError: 'shareid'

补充下:
info = panbaiducom.get_web_fileinfo(html, url)
print info
加入打印的话,info的值为
{u'loginstate': 1, u'username': u'cv***are', u'is_master_vip': 0, u'uk': None, u'is_evip': 0, u'is_year_vip': 0, u'photo': u'https://ss0.bdstatic.com/7Ls0a8Sm1A5BphGlnYG/sys/portrait/item/6a25ae65.jpg', u'show_vip_ad': 0, u'errortype': None, u'vip_end_time': None, u'is_master_svip': 0, u'sampling': False, u'urlparam': [], u'bdstoken': u'd6fc8bb72f692dccedb34e659d555085', u'is_vip': 0, u'is_svip': 0, u'XDUSS': u'pansec_DCb740ccc5511e5e8fedcff06b081203-z7nB3g2TdEp%2BM0Zqg8ADs5not3AguXI6GoqVbm1LZrCMXZ5bjNTSbmaxp8QI5XJtGTFqUNqCfDhAtypokgvNZpnBZEmlbfQuku5qbUeGKw9IAxlzRH00g%2BWYGozfQqJJpa534w66gravpeH0H58QsFTrCAKg8YqRYPzqPjhSSnvwNyTINq8gd3xnm6%2FaCrJsZqIR%2BzTZeiQ8ekRNPaQbLbfy14enc9gfJrXas6RJR4852chAlppPRiD3PWUyQpjqQco3QLhkhSZQ3IKr2VF0wg%3D%3D', u'is_auto_svip': 0}

@jumpx1 我这无法复现你的问题

screen shot 2017-03-11 at 18 27 23

@PeterDing 我想找到复现的方式,就是你关闭chrome浏览器,或者用chrome登录另外一个百度网盘账号后,此时通过bp save就会出现这种错误。貌似,还是cookie id的问题。

也就是通过静态cookie的方式登录后,还应该有动态cookie之类的东西还得修改。

能不能私聊? 2017年3月11日 22:50,"jumpx1" notifications@github.com写道:

也就是通过静态cookie的方式登录后,还应该有动态cookie之类的东西还得修改。 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#110 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/APXqcvnqNYiqKjZ0PEF_vhKqCQLx7Lhiks5rkrTQgaJpZM4MaKG9 .

请问这问题后来有找到原因吗?