longxiaofei / spider-BaiduIndex

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

TypeError: string indices must be integers #32

Closed francespizzuo closed 4 years ago

francespizzuo commented 4 years ago

Hi, I reused this scraper after two months. I used the cookies, "BDUSS" or "H_PS_PSSID", and still returns this error:

File "/Users/X/Downloads/spider-BaiduIndex-master 3/baidu_index/baidu_index.py", line 84, in _get_encrypt_datas uniqid = datas['data']['uniqid']

TypeError: string indices must be integers

This is where I get my cookies from:

Screenshot 2020-07-31 at 16 05 15

Thanks..

longxiaofei commented 4 years ago

Network -> www.baidu.com -> Headers -> Cookie -> Copy

WechatIMG76