Hi,
While clicking on link on the official website I can download the file.
But, unable to download same file when copying file url to browser due to referer header.
here is the link "https://www1.nseindia.com/content/historical/EQUITIES/2021/JAN/cm19JAN2021bhav.csv.zip"
Also I have included some required information the web server contains.
Is it possible to download using link?? or vba
pls help.
curl --header 'Host: www1.nseindia.com' --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --referer 'https://www1.nseindia.com/products/content/all_daily_reports.htm' --cookie 'ak_bmsc=0869C7482FF365333C433DD79E8ACA1017C8EFEF806C0000E3E40660B1C8C014~plWXGYkYVwNqbvuYuwNQQuWPU2KlCSWz7cuO3Ns/mvCTzN7ivFxzrPpcNGJJytYbQBq2LBgxmJj9XdS5Fnp+bHe/oPRX9q2rkpuiGb7J1sAeGqp8ScY+KBWfpTNgpMVXXaULo8xAUVZH9M9pvZt2TlSYw69ctBcbvNBnIZevbqCEP172JZ6EP2Cq9XVbN9eNz/dJe19vim1+EUbstbTdk1m9saG5n2Qz1kq+jjRRjf6y2IZjootpVUnsTlDr1tmxWQ; RT="z=1&dm=nseindia.com&si=55b5c57c-ecc5-441d-b4ac-9ce51b01dd9a&ss=kk428hxd&sl=1&tt=gn&bcn=%2F%2F684d0d36.akstat.io%2F&ld=pe&nu=05de5b8f1b78f6c5621e04b1d6886288&cl=1r5&ul=1rm"; bm_sv=046728C04CEEBA3606418FA66D9EE3B2~7A694WB/A66BjFa23SAC+hDs16vwK2HGdiyl4stcG24ZQRD0T+EOiOMDw2jZpZev0/coWyEzG4UbQpA3b7bYC/CO1mdOkFLZtLGKYfemQxjFiaJeyLxucESxWs4B+gcupRLVwDduMVLlXGI+YJn4K7FoonEJpH9Q3fyo2GeEdLU=; bm_mi=1C62C25F98379C4544797EC56FDABC06~7sY1ubo8TfnwhAmeBb3vZI8PSnyBuJXK/06lLjsZel1E4wDBHKoPaHGdVt46pdHBj/H+AR8EePEmeX1Z55dKXAo5wgT9z6zIq6+bgY9U6X7ZEVmyv6vBEMdRmAPM7jyHvW6+jgDPihikPjzj95AqJ7M8WnnMzQzgsaT0QEnkyK4znZoI7nlPkJ3cLkePOrQ6NI3i0jysdc8YBc+hPXuX7RVjYPscZHrXoUFoHekREfD1bU02uky9T5kegrZGJxHFRWapeiU9x+nCItq49JM0v6A559nxJLf16h1yB+H0YZ47czv5Mm3LxukbHheNr4XnDUvqdEh7/h2aBHQ/uI9T3A==' --header 'Upgrade-Insecure-Requests: 1' 'https://www1.nseindia.com/content/historical/EQUITIES/2021/JAN/cm19JAN2021bhav.csv.zip' --output 'cm19JAN2021bhav.csv.zip'
While clicking on link on the official website I can download the file.
But, unable to download same file when copying file url to browser due to referer header.
here is the link "https://www1.nseindia.com/content/historical/EQUITIES/2021/JAN/cm19JAN2021bhav.csv.zip"
Also I have included some required information the web server contains.
Is it possible to download using link?? or vba
pls help.
curl --header 'Host: www1.nseindia.com' --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --referer 'https://www1.nseindia.com/products/content/all_daily_reports.htm' --cookie 'ak_bmsc=0869C7482FF365333C433DD79E8ACA1017C8EFEF806C0000E3E40660B1C8C014~plWXGYkYVwNqbvuYuwNQQuWPU2KlCSWz7cuO3Ns/mvCTzN7ivFxzrPpcNGJJytYbQBq2LBgxmJj9XdS5Fnp+bHe/oPRX9q2rkpuiGb7J1sAeGqp8ScY+KBWfpTNgpMVXXaULo8xAUVZH9M9pvZt2TlSYw69ctBcbvNBnIZevbqCEP172JZ6EP2Cq9XVbN9eNz/dJe19vim1+EUbstbTdk1m9saG5n2Qz1kq+jjRRjf6y2IZjootpVUnsTlDr1tmxWQ; RT="z=1&dm=nseindia.com&si=55b5c57c-ecc5-441d-b4ac-9ce51b01dd9a&ss=kk428hxd&sl=1&tt=gn&bcn=%2F%2F684d0d36.akstat.io%2F&ld=pe&nu=05de5b8f1b78f6c5621e04b1d6886288&cl=1r5&ul=1rm"; bm_sv=046728C04CEEBA3606418FA66D9EE3B2~7A694WB/A66BjFa23SAC+hDs16vwK2HGdiyl4stcG24ZQRD0T+EOiOMDw2jZpZev0/coWyEzG4UbQpA3b7bYC/CO1mdOkFLZtLGKYfemQxjFiaJeyLxucESxWs4B+gcupRLVwDduMVLlXGI+YJn4K7FoonEJpH9Q3fyo2GeEdLU=; bm_mi=1C62C25F98379C4544797EC56FDABC06~7sY1ubo8TfnwhAmeBb3vZI8PSnyBuJXK/06lLjsZel1E4wDBHKoPaHGdVt46pdHBj/H+AR8EePEmeX1Z55dKXAo5wgT9z6zIq6+bgY9U6X7ZEVmyv6vBEMdRmAPM7jyHvW6+jgDPihikPjzj95AqJ7M8WnnMzQzgsaT0QEnkyK4znZoI7nlPkJ3cLkePOrQ6NI3i0jysdc8YBc+hPXuX7RVjYPscZHrXoUFoHekREfD1bU02uky9T5kegrZGJxHFRWapeiU9x+nCItq49JM0v6A559nxJLf16h1yB+H0YZ47czv5Mm3LxukbHheNr4XnDUvqdEh7/h2aBHQ/uI9T3A==' --header 'Upgrade-Insecure-Requests: 1' 'https://www1.nseindia.com/content/historical/EQUITIES/2021/JAN/cm19JAN2021bhav.csv.zip' --output 'cm19JAN2021bhav.csv.zip'