from bs4 import BeautifulSoup
soup = BeautifulSoup(open("index.html"))
soup = BeautifulSoup(""<html>data</html>"")
Getting this warning: BeautifulSoup([your markup]) to this: BeautifulSoup([your markup], "lxml") markup_type=markup_type))
from bs4 import BeautifulSoup
soup = BeautifulSoup(open("index.html"))
soup = BeautifulSoup(""<html>data</html>"")
Getting this warning: BeautifulSoup([your markup]) to this: BeautifulSoup([your markup], "lxml") markup_type=markup_type))
BeautifulSoup need to know what to parse The thing you are giving maybe html, maybe xml, both have somewhat different structures So in the second argument of the function you need to specify that whether the given document is html/xml or whatever
from bs4 import BeautifulSoup
src='"<html>data<//html>"'
soup=BeautifulSoup(src,"html.parser")