0

In python, How can I download a file. I see this link

Basic http file downloading and saving to disk in python?

But this assumes that you know the type of file you are downloading, but what if I have a link like

http://www.example.com?/factory.aspx?did=123

and this link opens an image or a pdf or a word file or anything really. How can I get the filename of it and save it to my disk. Cause if I visit the link, then the address bar is still the same (doesn't show the file name) but if i try to save the file, the default name in the save window is the actual filename.

Does anyone know how to do this?

Thanks

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.