I have a form which when submitted by a user redirects to a thank you page and the file chosen for download begins to download.
How can I save this file using python? I can use python's urllib.urlopen to open the url to post to but the html returned is the thank you page, which I suspected it would be. Is there a solution that allows me to grab the contents of the file being served for download from the website and save that locally?
Thanks in advance for any help.
If you're getting back a thank you page, the URL to the file is likely to be in there somewhere. Look for <meta http-equiv="refresh"> or JavaScript redirects. Ctrl+F'ing the page for the file name might also help.
Some sites may have extra protection in, so if you can't figure it out, post a link to the site, just in case someone can be bothered to look.
Python - How do I save a file delivered from html?