Skip to content

Instantly share code, notes, and snippets.

@thewhitetulip
Created December 12, 2015 13:23
Show Gist options
  • Save thewhitetulip/ba0bddf61fc5c1ad1970 to your computer and use it in GitHub Desktop.
Save thewhitetulip/ba0bddf61fc5c1ad1970 to your computer and use it in GitHub Desktop.
A simple python script to to create links to download shareholder letts of bershire hathaway
start_year = 1977
end_year = 2015
ltr_year = 2004
link = "http://berkshirehathaway.com/letters/"
for i in range(start_year, end_year):
if i <ltr_year:
print(link+str(i)+".html")
else:
print(link+str(i)+"ltr.pdf")
####this will print the links of the annual letters, now use a file downloader like wget to download the files
#### save this to a file.txt and run `wget -i file.txt` and you are done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment