Reputation: 395
I have a python script that needs to download a csv file from:
The issue I have is you have to log in to the website first, It is Cookie based authentication (HTML form login).
So far I have looked at urllib2 and Requests and haven't had much luck.
Upvotes: 0
Views: 3044
Reputation: 2406
The requests
library should do what you want. You can use Session
objects to persist the authentication.
To quote the request docs -
The Session object allows you to persist certain parameters across requests. It also persists cookies across all requests made from the Session instance.
Post your code if you are still experiencing problems.
Upvotes: 1