Last active
February 18, 2025 21:15
-
-
Save ScribbleGhost/e5b6a808681004d207a3ee7fdb6ec9ea to your computer and use it in GitHub Desktop.
Parse a local HTML file with Python 3 and Beautiful Soup 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
soup = BeautifulSoup(open("C:\\path\\to\\your\\html\\file.html", encoding="utf8"), "html.parser") | |
print(soup.find_all("div", class_="someclass")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you. saved my life