Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

登录时报错 #45

Open
Freakwill opened this issue Nov 1, 2018 · 0 comments
Open

登录时报错 #45

Freakwill opened this issue Nov 1, 2018 · 0 comments

Comments

@Freakwill
Copy link

Freakwill commented Nov 1, 2018

输入完密码,报错

60 response = self.get(url or URL.index())
61 soup = BeautifulSoup(response.content, "lxml")
---> 62 xsrf = soup.find('input', attrs={"name": "_xsrf"}).get("value")
63 return xsrf
64

AttributeError: 'NoneType' object has no attribute 'get'

我打印过html, 确实没有'input', attrs={"name": "_xsrf"}这样的标签。
如果用try语句跳过,可以显示验证码,但是输入验证码之后还是报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant