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

UnboundLocalError: local variable 'html' referenced before assignment #2

Open
ScottishFold007 opened this issue Oct 28, 2019 · 3 comments

Comments

@ScottishFold007
Copy link

我又来了,又出现了一个报错:
image
谢谢大牛解答!

@ScottishFold007
Copy link
Author

image
跟这个变量有关

@TauWu
Copy link
Owner

TauWu commented Oct 28, 2019

这块代码确实有一些问题,没有定义变量而return了,后面我改一下。
然后这个报错主要是微博热搜页面的反爬虫机制,请求被拒绝了。前两天我加了 headers,现在可能要加点别的东西了,你可以去扒一下请求。

@ScottishFold007
Copy link
Author

这块代码确实有一些问题,没有定义变量而return了,后面我改一下。
然后这个报错主要是微博热搜页面的反爬虫机制,请求被拒绝了。前两天我加了 headers,现在可能要加点别的东西了,你可以去扒一下请求。

嗯嗯,我正在改这部分代码,谢谢哈!

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

2 participants