0
以下のコマンドを使用してデータをダウンロードしようとしています。urllib.urlretrieveが失敗しています
import urllib
url = 'http://www.nse-india.com/content/historical/EQUITIES/2002/MAR/cm01MAR2002bhav.csv.zip'
urllib.urlretrieve(url, 'myzip')
What I see in the file generated file my.zip is,
You don't have permission to access "http://www.nse-india.com/content/historical/EQUITIES/2002/MAR/cm01MAR2002bhav.csv.zip" on this server.<P>
Reference #18.7d427b5c.1311889977.25329891
しかし、私はこの理由は何の問題 せずにWebサイトからファイルをダウンロードすることができますよ。
Mozillaのようにuser-agentを試しても同じ問題があり、[link](http://code.activestate.com/recipes/572202-web-browser-emulator/)を使ってみましたが、余分なバイト数でダウンロードされますが、それは壊れています。 – kanna
コードではなく、そのレシピから他のヘッダーを使用してみてください。 – agf