(Sep-07-2018, 09:03 PM)Truman Wrote: here is an another way to import html file:Have to be careful with encoding doing this.
Both on how get html from web(save) and open it.
It's easy to mess up Unicode,so try use UTF-8 always in and out.
with open("htmll.html", encoding=utf-8) as fp: soup = BeautifulSoup(fp, 'lxml') print(soup.prettify())Requests and BS do this well together,i explain better here Reading a html file.