Created
December 19, 2018 02:17
-
-
Save mlouielu/2900ef3d1ed0ea95b08e2bfec6a14660 to your computer and use it in GitHub Desktop.
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 requests | |
URL = 'http://www.twse.com.tw/exchangeReport/MI_INDEX?response=csv&date=20181218&type=ALL' | |
def main(url): | |
r = requests.get(url) | |
with open('test.csv', 'w') as f: | |
f.write(r.text) | |
if __name__ == '__main__': | |
main(URL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment