Привет. Я пытаюсь извлечь текст из HTML с помощью функции BeautifulSoup в python - он работает хорошо, но я не получаю то, что мне нужно.Мой код имеет следующий вид:
url = "http://news.bbc.co.uk/2/hi/health/2284783.stm"
html = urlopen(url).read()
raw = BeautifulSoup(html).get_text()
Консоль Python сообщает следующее, и я не понимаю проблему и буду признателен за помощь.
raw = BeautifulSoup(html).get_text()
C:/Users/muradz14/.spyder-py3/raw.py:1: UserWarning: 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 1 of the file C:/Users/muradz14/.spyder-py3/raw.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.