python GuessedAtParserWarning:パーサーが明示的に指定されていません

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.

通常の操作ですが、情報の大部分は、主に、追加できるfeatures = "lxml"にパーサー指定するように指示することをお勧めします

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

おすすめ

転載: blog.csdn.net/weixin_45598506/article/details/112761974