Help needed Edward(edk) or anyone who can help

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

RPC
Posts: 304
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

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

Post 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
Attachments
FO download error.png
FO download error.png (204.03 KiB) Viewed 752 times
edk
Posts: 999
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

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

Post 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"
RPC
Posts: 304
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

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

Post by RPC »

Thank you very much for providing the solution, Edward. :ugeek:
You have been very very helpful. :D
Post Reply