longxiaofei / spider-BaiduIndex

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

Update qr_login.py #45

Closed M4rque2 closed 3 years ago

M4rque2 commented 3 years ago

MOD: 百度cookie改版修复, get_exin方法出现分支,生成__yjsv5_shitong或__yjs_st

longxiaofei commented 3 years ago
__yjs_st = b64encode(quote("_".join([resp_data['data'], resp_data['key_id'], resp_data['sign']])).encode()) # __yjs_st = "b'xxxx'"
return "; __yjs_st=2_{}".format(__yjs_st)''  # return "; __yjs_st=2_b'xxxx'"

我不确定__yjs_st是否需要decode一次?

如果不需要的话,我可以直接合了。

M4rque2 commented 3 years ago

确实需要,这里大意了,抱歉