Created
September 27, 2020 17:17
-
-
Save fnneves/7b1c9d75beaf86f985cc3fff1ad5acbb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import bs4 | |
html = """<html> | |
<div class="some_class"> | |
some random text to be scraped | |
</div> | |
</html>""" | |
parsed_html = bs4.BeautifulSoup(html, "html.parser") | |
text_scraped = parsed_html.find("div",attrs={"class":"some_class"}).text | |
print(text_scraped) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment