@josh1 bhai
need some help here
WGET on win10 is working fine and using same user-agent downloads the NSE files.
This time its not the referrer issue like last time.
From R, the problem seems to be the TLS version. NSE may have updated min TLS requirement which fails to complete handshake.
At many places, like GIT etc, TLSv1 has been scrapped.
if R uses WINHTTP from OS, then somehow it should request TLS1.2 or something on those lines.
View attachment 38460
Code:
wget --header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" https://www.nseindia.com/content/historical/EQUITIES/2019/NOV/cm05NOV2019bhav.csv.zip
this works from cmd, (header/Accept isn't mandatory) works both with and without it.