Created
May 4, 2020 10:29
-
-
Save jamescalam/8799f4a2aee281bac7e0aa12cbcf8ba9 to your computer and use it in GitHub Desktop.
Importing beautiful soup library and extracting the list of letter links for Epistulae Morales Ad Lucilium.
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 requests | |
| from bs4 import BeautifulSoup | |
| # import page containing links to all of Seneca's letters | |
| # get web address | |
| src = "https://en.wikisource.org/wiki/Moral_letters_to_Lucilius" | |
| html = requests.get(src).text # pull html as text | |
| soup = BeautifulSoup(html, "html.parser") # parse into BeautifulSoup object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment