Last active
September 2, 2020 20:44
-
-
Save josht-jpg/98eb2715a5ba695df73dfecd96bc0b7c to your computer and use it in GitHub Desktop.
Getting Notes from the Underground from Gutenberg.org
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 urllib import request | |
def get_book(url): | |
response = request.urlopen(url) | |
return response.read().decode('utf8') | |
notes_from_underground_raw = get_book("http://www.gutenberg.org/files/600/600.txt") | |
crime_and_punishment_raw = get_book("http://www.gutenberg.org/files/2554/2554-0.txt") | |
the_idiot_raw = get_book("http://www.gutenberg.org/files/2638/2638-0.txt") | |
the_possessed_raw = get_book("http://www.gutenberg.org/files/8117/8117-0.txt") | |
the_brothers_karamazov_raw = get_book("http://www.gutenberg.org/files/28054/28054-0.txt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment