Python Forum
Importing created module for web scraping with bs4
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing created module for web scraping with bs4
#5
(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.
Reply


Messages In This Thread
RE: Importing created module for web scraping with bs4 - by snippsat - Sep-07-2018, 10:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  having a problem in importing module pratheep 1 2,751 Jan-20-2018, 07:54 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020