I'm trying to download a csv file from this link. I know from this thread that we need to use the requests
library to get the link by first submitting the form, in this case, to let the server know we want the csv file. However, since I'm not familiar with html and the previous example has now an updated page, I wasn't able to figure out how to do this, i.e., what formdata to submit and how to post the form and get the link...Any help is appreciated.
Asked
Active
Viewed 1,405 times
1

George Liu
- 3,601
- 10
- 43
- 69
-
2GET `http://climate.weather.gc.ca/climate_data/bulk_data_e.html?format=csv&stationID=26953&Year=2018&Month=1&Day=1&timeframe=2&submit=Download+Data`, that's all – t.m.adam Jan 22 '18 at 22:28
-
Thank you@t.m.adam! Can you please provide more details? – George Liu Jan 23 '18 at 01:11
-
1You mean about the url? You've opened Inspect already, so next go to the Network tab. When you click the "Download Data" button you'll notice a GET request to the url in my previous comment (if you click on it you can see more details, headers, etc). – t.m.adam Jan 23 '18 at 01:30