Я сделал простой словарь в python. Вот код:
from PyDictionary import PyDictionary
def function():
x = input("Look up: ")
print(PyDictionary.meaning(x))
function()
def main():
function()
if __name__ == '__main__':
main()
Когда я запускаю его, я получаю это сообщение об ошибке:
UserWarning: 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 5 of the file
C:\Users\ethan\AppData\Roaming\Python\Python38\site-packages\PyDictionary\utils.py. To get rid
of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup
constructor.
return BeautifulSoup(requests.get(url).text)
Кто-нибудь знает, как от него избавиться? Я также не знаю, что такое «конструктор BeautifulSoup».
Мой python сборка:
PyCharm 2019.3.3 (Community Edition)
Build #PC-193.6494.30, built on February 6, 2020
Runtime version: 11.0.5+10-b520.38 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 725M
Cores: 4
Registry:
Non-Bundled Plugins: aws.toolkit