名称错误:名称“html”未定义

问题描述 投票:0回答:1

我不明白为什么会出现此错误以及我该如何解决它。这是我第一次使用这种方法,所以要冷静(^^)。我觉得这是个好方法,但是…… 谢谢你的帮助[enter image description here] https://i.stack.imgur.com/EeuRR.png

我尝试导入librairis

python web-scraping import
1个回答
0
投票

在 [4] 块中,您不再处于 get_html 函数中。 所以要让它发挥作用。

试试这个:

将[4]块放入[3]块中的get_html函数中

© www.soinside.com 2019 - 2024. All rights reserved.