0

I can't seem to find a source that does exactly what I want.

I have a website where there are download links, such that when I click one it downloads a pdf file. Also this website is password protected.

How in python 2.7 (not 3, because I use 2.7 for other stuff) can I automatically download this file? All solutions I have seen either don't work or only work for a direct link to the file not a download link.

An alternative is javascript but then I would need to be able to rename the file or at least take a note of what the name is.

Please help

Iexist
  • 53
  • 1
  • 7
  • You can [download the file using Node](https://stackoverflow.com/questions/11944932/how-to-download-a-file-with-node-js-without-using-third-party-libraries) or [using python](https://stackoverflow.com/questions/22676/how-do-i-download-a-file-over-http-using-python) or with any language that supports making HTTP requests. Though I'm not sure I understand what you mean by "direct link" and "download link". – SimpleJ May 25 '18 at 18:32
  • By direct linki mean a Link that when I click it I see the file, and a download link is when I click it it downloads the file. (in download link it also downloads file if i copy and paste link into browser and hit enter. The download link doesnt end in a .pdf even though it is a pdf – Iexist May 26 '18 at 11:29

0 Answers0