Created
February 6, 2011 04:08
-
-
Save acompa/813116 to your computer and use it in GitHub Desktop.
General idea behind opening and DLing BBs.
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
import urllib2, re | |
targetURL = "http://www.minneapolisfed.org/bb/reports/1990/90-01-su.cfm" | |
site = urllib2.urlopen(targetURL) | |
out = "/Users/alexc/Dropbox/Develop/BB/data/1990-01.html" | |
with open(out, 'w') as BBFile: | |
for line in site.readlines(): | |
p = re.compile(r'<.*?>') | |
BBFile.write(p.sub('', line)) | |
site.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment