0

I'm trying to download a file from a website which requires log-in. By command line it can easily be done via

curl --proxy-anyauth -p -c cookie -u user:psw -L url > file.ext

Any advices on how to do that in python? Thank you

Biska
  • 13
  • 3

1 Answers1

0

I have never used this before however I think this could work.
Here is the link to PyCurl library

http://pycurl.sourceforge.net

iProgram
  • 6,057
  • 9
  • 39
  • 80
  • https://www.google.co.uk/search?client=safari&rls=en&q=python+curl&ie=UTF-8&oe=UTF-8&gfe_rd=cr&ei=kYvkVJKlN4zCWK6UgNAN . Wonders what a simple google search does! – iProgram Feb 18 '15 at 12:57
  • 1
    Thanks, I tried PyCurl, but in the end i choose to use requests. requests.get(url, auth=(user, pWord)) seems a far clearer way to me. – Biska Mar 04 '15 at 23:39
  • Ok. Glad you found something you liled – iProgram Mar 05 '15 at 08:48