-1

I want to download a file in Python shell like files get downloaded into browser. Yes, I know there are multiple ways like curl, wget, url retrieve etc. but here in all the cases, file name is not the same as original file. Like if I want to download file from this url:

http://www.siemens.com/investor/pool/en/investor_relations/financial_publications/speeches_and_presentations/110405_trading_update_q2_11.pdf

I want to download the file from this url as it get downloaded in browser, with the same name as original.

Animesh
  • 147
  • 8
jugadengg
  • 99
  • 1
  • 3
  • 15

2 Answers2

0

https://pypi.python.org/pypi/wget

There is a simple option. Not familiar with Python as well as other languages.

Animesh
  • 147
  • 8
Alan Doyle
  • 98
  • 16
  • hi i know this option ,i have mentioned my requirement. here if i use wget, it does not give me real name of file ,but it does gives me name extracted from url .like for this 'http://ir.paalp.com/External.asp?L=I&from=du&ID=63563&B=789' it will give me External.asp as file name, but that is not real name actually . – jugadengg Jan 22 '14 at 06:22
0

If you are using Python 2.7

urllib.urlretrieve

Jakob Bowyer
  • 33,878
  • 8
  • 76
  • 91