Page 2 of 2

Re: Help needed Edward(edk) or anyone who can help

Posted: Sat Jul 13, 2024 2:57 pm
by RPC
Hi Edward
Sorry to bother you .
I tried the method suggested by you for downloading the derivatives file.
I am getting the enclosed error. I think it downloads Headers and cookie( as checked by me using msgdebug function) but get 401 Error.
I had changed the Url and currentURL in the code. No other changes were made.
Pls advise.
Thanks
Rajeev

Re: Help needed Edward(edk) or anyone who can help

Posted: Sun Jul 14, 2024 1:09 am
by edk
The problem seems to be the & sign in the name of the F&O - UDiFF Common Bhavcopy Final (zip) archive, replace it with %26, set the url address for authorized cookies to "http://www.nseindia.com/all-reports", not to "https://www.nseindia.com/all-reports-derivatives"

Code: Select all

cUrl := '/api/reports?archives=[{"name":"F%26O - UDiFF Common Bhavcopy Final (zip)","type":"archives","category":"derivatives","section":"equity"}]&date='+cDateQuery+'&type=equity&mode=single'    
//
cCurrentUrl := "http://www.nseindia.com/all-reports"

Re: Help needed Edward(edk) or anyone who can help

Posted: Sun Jul 14, 2024 11:28 am
by RPC
Thank you very much for providing the solution, Edward. :ugeek:
You have been very very helpful. :D