longxiaofei / spider-BaiduIndex

data sdk for baidu Index
MIT License
748 stars 230 forks source link

TypeError: string indices must be integers #29

Closed pu1ssant closed 4 years ago

pu1ssant commented 4 years ago

Traceback (most recent call last): File "/Users/xxx/Desktop/baidu/demo.py", line 28, in for index in baidu_index.get_index(): File "/Users/xxx/Desktop/baidu/baidu_index/baidu_index.py", line 51, in get_index encrypt_datas, uniqid = self._get_encrypt_datas( File "/Users/xxx/Desktop/baidu/baidu_index/baidu_index.py", line 88, in _get_encrypt_datas uniqid = datas['data']['uniqid'] TypeError: string indices must be integers

用大佬的demo.py跑了一下,但出现了如上报错。cookies是配置成功了的。

longxiaofei commented 4 years ago

代码和cookie发我邮箱吧。

pu1ssant commented 4 years ago

代码和cookie发我邮箱吧。

SORRY.在设置cookie时少复制了BDUSS=这部分,现在OK了>_<