GuessedAtParserWarning: No parser was explicitly specified

f:\py\verification.py:148: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or
in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 148 of the file f:\py\verification.py. To get rid of this warning, pass
the additional argument 'features="lxml"' to the BeautifulSoup constructor.

可以正常运行,但是提示错误,

添加上 :features="lxml" 就可以了。

soup = BeautifulSoup(response, features="lxml")

 

posted @ 2021-11-28 10:41  609669521  阅读(335)  评论(0编辑  收藏  举报