Last active
June 1, 2021 20:30
-
-
Save Tomiwa-Ot/84ed4eb2573a2388fbf7d126b8d8e097 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
| from bs4 import BeautifulSoup | |
| import requests | |
| text = "" | |
| reqs = requests.get(url) | |
| soup = BeautifulSoup(reqs.text, 'lxml') | |
| for heading in soup.find_all("h3"): | |
| print(heading.name + ' ' + heading.text.strip()) | |
| text = heading.text.strip() | |
| print(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment