python get html info

from bs4 import BeautifulSoup

my_HTML = #Some HTML file (could be a website, you can use urllib for that)

soup = BeautifulSoup(my_HTML, 'html.parser')


Here is what the above code is Doing:
1. We’re importing the BeautifulSoup library.
2. We’re creating a BeautifulSoup object from the HTML file.
3. We’re printing the HTML file in a pretty format.