python GuessedAtParserWarning: No parser was explicitly specified

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 20 of the file d:/work/firstpro/爬虫学习/最基本爬虫.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.

Normal operation, but suggests that a large section of information, mainly tell you to specify the parser to features = "lxml" you can add

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

Guess you like

Origin blog.csdn.net/weixin_45598506/article/details/112761974