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 urllib.request | |
| def getData(ticker): | |
| url = "http://chart.finance.yahoo.com/table.csv?s={}&a=1&b=12&c=2017&d=2&e=12&f=2017&g=d&ignore=.csv".format(ticker) | |
| data = urllib.request.urlopen(url) | |
| doc = open("yahoo_finance_{}.csv".format(ticker), 'w') | |
| doc.write(data.read().decode("utf8")) | |
| doc.close() | |
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
| #!/usr/bin/python3 | |
| """ | |
| http://www.davetromp.net/2017/03/learn-how-to-code-with-python-lesson-1.html | |
| Learn how to code with python: Lesson 1 - Hello World! | |
| Lesson 1 | |
| Basics | |
| Programming paradigms | |
| - Scripting *** | |
| - Procedural ** | |
| - Object oriented * |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer