I need to download a file that is on a password protected page. To get to the page manually I first have to authenticate via an ordinary login page. I want to use curl to fetch this page in script.
My script first logins. It appears to succeed--it returns a 200 from a PUT to /login. However, the fetch of the desired page fails, with a 500.
I am using a "cookie jar":
C.setopt(pycurl.COOKIEJAR, 'cookie.txt')
In verbose mode, I can see cookies being exchanged when I fetch the file I need. Now my question: Is there more to using a COOKIEJAR?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…