本文主要是介绍GuessedAtParserWarning: No parser was explicitly specified, the best available HTML parser,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
html = req.textbf = BeautifulSoup(html)
虽然正常运行了,警告了一大段信息,要你指明解析器把features=“html.parser” 加上就可以
GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). 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 8 of the file D:\pythonProject\STU\HTML.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.bf = BeautifulSoup(html)
修改后,就正常了,
html = req.textbf = BeautifulSoup(html,features="html.parser")
这篇关于GuessedAtParserWarning: No parser was explicitly specified, the best available HTML parser的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!