Unable to download a file from the link, used CURL
I am trying to download stockmarket data from NSE website, till 2018 i was able to get the file downloaded using CURL in command Line, But now its not working anymore.
Please help me a way to download it from command line.
Working : Using Chrome and clicking on the link
Not Working : CURL method, copying the link to chrome in another tab is also not working
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip" on this server.<P>
Reference #18.93fa56b8.1546394430.40ca86c6
</BODY>
</HTML>
A zip file has to be downloaded without being corrupted.
web curl
add a comment |
I am trying to download stockmarket data from NSE website, till 2018 i was able to get the file downloaded using CURL in command Line, But now its not working anymore.
Please help me a way to download it from command line.
Working : Using Chrome and clicking on the link
Not Working : CURL method, copying the link to chrome in another tab is also not working
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip" on this server.<P>
Reference #18.93fa56b8.1546394430.40ca86c6
</BODY>
</HTML>
A zip file has to be downloaded without being corrupted.
web curl
add a comment |
I am trying to download stockmarket data from NSE website, till 2018 i was able to get the file downloaded using CURL in command Line, But now its not working anymore.
Please help me a way to download it from command line.
Working : Using Chrome and clicking on the link
Not Working : CURL method, copying the link to chrome in another tab is also not working
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip" on this server.<P>
Reference #18.93fa56b8.1546394430.40ca86c6
</BODY>
</HTML>
A zip file has to be downloaded without being corrupted.
web curl
I am trying to download stockmarket data from NSE website, till 2018 i was able to get the file downloaded using CURL in command Line, But now its not working anymore.
Please help me a way to download it from command line.
Working : Using Chrome and clicking on the link
Not Working : CURL method, copying the link to chrome in another tab is also not working
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip" on this server.<P>
Reference #18.93fa56b8.1546394430.40ca86c6
</BODY>
</HTML>
A zip file has to be downloaded without being corrupted.
web curl
web curl
edited Jan 2 at 6:40
Andy Aldo
683724
683724
asked Jan 2 at 2:28


Kalyan BabuKalyan Babu
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
What's the Referer Page? -- The page you can do this download manually.
Try add -e
Referer URL,
And change your UA.
But apparently the site don't like someone to leech their data anymore, so you might need to stop this.
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54000561%2funable-to-download-a-file-from-the-link-used-curl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
What's the Referer Page? -- The page you can do this download manually.
Try add -e
Referer URL,
And change your UA.
But apparently the site don't like someone to leech their data anymore, so you might need to stop this.
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
add a comment |
What's the Referer Page? -- The page you can do this download manually.
Try add -e
Referer URL,
And change your UA.
But apparently the site don't like someone to leech their data anymore, so you might need to stop this.
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
add a comment |
What's the Referer Page? -- The page you can do this download manually.
Try add -e
Referer URL,
And change your UA.
But apparently the site don't like someone to leech their data anymore, so you might need to stop this.
What's the Referer Page? -- The page you can do this download manually.
Try add -e
Referer URL,
And change your UA.
But apparently the site don't like someone to leech their data anymore, so you might need to stop this.
answered Jan 2 at 3:57


TiwTiw
4,15761630
4,15761630
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
add a comment |
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
Tried adding referer and changing UA. But it is not working as you said
– Kalyan Babu
Jan 2 at 5:14
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54000561%2funable-to-download-a-file-from-the-link-used-curl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown