[英]How to get rid of the BeautifulSoup html parser error when I'm not using BeautifulSoup
我將使用GUI制作字典程序,但我遇到了第一個障礙。 我剛剛安裝了一個模塊( PyDictionary ),但是當我運行以下代碼時,我得到了一個錯誤。
from PyDictionary import PyDictionary
dictionary = PyDictionary()
print(dictionary.meaning("fish"))
哪個返回
The code that caused this warning is on line 3 of the file Dictionary.py. To
get rid of this warning, change code that looks like this:
BeautifulSoup(YOUR_MARKUP})
to this:
BeautifulSoup(YOUR_MARKUP, "lxml")
markup_type=markup_type))
{'Noun': ['any of various mostly cold-blooded aquatic vertebrates usually having scales and breathing through gills', 'the flesh of fish used as food', '(astrology', 'the twelfth sign of the zodiac; the sun is in this sign from about February 19 to March 20'], 'Verb': ['seek indirectly', 'catch or try to catch fish or shellfish']}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.