-
Notifications
You must be signed in to change notification settings - Fork 255
Description
其他情况zhihu.profile()调用后,输入账号密码也是报差不多的错误
$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
from zhihu import Account
account = Account()
account.login("yxxxxxxxxxx","pxxxxxx")
Traceback (most recent call last):
File "", line 1, in
File "/home/yiwu/.local/lib/python3.5/site-packages/zhihu/models/account.py", line 29, in login
return self._login_api(account, password)
File "/home/yiwu/.local/lib/python3.5/site-packages/zhihu/models/account.py", line 35, in _login_api
_xsrf, _dc0 = self._get_xsrf_dc0()
File "/home/yiwu/.local/lib/python3.5/site-packages/zhihu/models/base.py", line 84, in _get_xsrf_dc0
xsrf = response.cookies["_xsrf"]
File "/home/yiwu/.local/lib/python3.5/site-packages/requests/cookies.py", line 329, in getitem
return self._find_no_duplicates(name)
File "/home/yiwu/.local/lib/python3.5/site-packages/requests/cookies.py", line 400, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='_xsrf', domain=None, path=None"