-1
的UserWarning消息每次我做的湯頁面與蟒蛇BS4一個源代碼,終端顯示:避免顯示BS4庫
/usr/local/lib/python3.4/dist-packages/bs4/__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html5lib"). 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 229 of the file HibernetBlock.py. To get rid of this warning, change code that looks like this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "html5lib")
markup_type=markup_type))
有沒有辦法避免以顯示此?
您是否試過做警告要求您做的事情? – Andy
是啊...但它可以是一個不同的警告在另一臺計算機...我需要禁用它。這是可選的。 – Sperly1987
警告是一樣的......它可以改變只是「html5ib」的一部分..沒有更多 – Sperly1987