edk - Help required for downloading

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

edk - Help required for downloading

Post by RPC »

Hi Edward
I am back with some new problem in dowloading. Hope you can resolve it.
I want to download from this site
https://www.bseindia.com/corporates/List_Scrips.html
Segment - Equity T+1 On clicking Submit button the list is generated in CSV format and can be downloaded on clicking download symbol appearing on right hand side.
It probabbly uses this API
https://www.bseindia.com/BseIndiaAPI/ap ... Scripcode=
but using it directly on brower generates error 404
I have tried by retrieving cookies but it seems the website doen't generate cookies.
I have tried chatGPT, Gemini and DeepSeek but they have failed to provide solution in HMG, though a solution using bseindia library is possible.
Can you pls check this whenever you have time.
Thanks a lot.
rpc
User avatar
danielmaximiliano
Posts: 2795
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: edk - Help required for downloading

Post by danielmaximiliano »

Hola, el error 404 se debe que el sitio tiene otra estructura y claramente dice que use el menu y actualizar los marcadores.
c
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
RPC
Posts: 319
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: edk - Help required for downloading

Post by RPC »

Thanks Daniel Maximiliano,
Can you suggest a way of downloading the data. Since I am not getting cookies also I just don't know how to proceed.
Thanks for your interest.
User avatar
danielmaximiliano
Posts: 2795
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: edk - Help required for downloading

Post by danielmaximiliano »

RPC wrote: ↑Tue Oct 06, 2026 5:45 am Thanks Daniel Maximiliano,
Can you suggest a way of downloading the data. Since I am not getting cookies also I just don't know how to proceed.
Thanks for your interest.
Si me dices exactamente que quiere hacer te puedo ayudar. porque veo que en el primer link hay una sucesion de datos y el siguiente link API esta mal por eso el error 404.
ademas intente buscar en google y me devolvio un GITHUB a una API en Pyton pero creo no creo que es lo que necesitas
https://github.com/BennyThadikaran/BseIndiaApi
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
RPC
Posts: 319
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: edk - Help required for downloading

Post by RPC »

Hi Daniel
I need to download from this site
https://www.bseindia.com/corporates/List_Scrips.html
after opening the site, Segment selected should be 'Equity T+1' , other 3 comboboxes Groups, Status and Security name need not be filled, Click 'Submit' button, Data will be displayed below and it can be downloaded in CSV format(Equity.csv) by clicking download symbol appearing on right hand side.
I want to download this file Equity.csv through HMG.
After download on checking downloads folder and obtaining the link by right clicking I got following link
https://api.bseindia.com/BseIndiaAPI/ap ... ty&status=
On using this link also I can't download Equity.csv.
Can you help ?
Thanks in advance.
rpc
User avatar
danielmaximiliano
Posts: 2795
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: edk - Help required for downloading

Post by danielmaximiliano »

Hola, aqui tienes el ejemplo funcional
Attachments
BseIndia API.rar
(1.59 MiB) Downloaded 7 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
RPC
Posts: 319
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: edk - Help required for downloading

Post by RPC »

Many thanks Daniel.
You have solved my problem which chatGPT, Gemini and DeepSeek failed to solve.
They asked me to use python but you have provided solution within HMG.
God Bless you.
With best Wishes.
rpc
User avatar
danielmaximiliano
Posts: 2795
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: edk - Help required for downloading

Post by danielmaximiliano »

Hola : vi varios repositorios en GitHub refieriendose a la API de BSE como ser.

Code: Select all

https://github.com/BennyThadikaran/BseIndiaApi
An Unofficial Python Api for BSE India stock exchange.
pero esto implica instalar Pyton en su ultima versión.
Pyton como es un lenguaje interpretado para algunas cosas es lento pero para otras es espectacular.

se podia usar Curl: pero implica descargar CURL , compilar el contrib de Harbour y usar la libreria puente en HMG.

la solución mas rápida es encapsular un objeto.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
RPC
Posts: 319
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: edk - Help required for downloading

Post by RPC »

Thanks for further guidance Daniel.
I could download using python library bseindia (curtsey chatGPT/DeepSeek/Gemini), however I wanted purely HMG code which you have provided.

I do not understand WinHTTP and the likes.
edk(Edward) had helped me a lot in the past in my programs to download from nseindoa.com website. I am always grateful to him.

I also tried curl.exe but no matter how much I tried, I could never get csv file. I got html file or error 403.
Can it be downloaded using curl.exe ?

Thanks a lot
rpc
User avatar
danielmaximiliano
Posts: 2795
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: edk - Help required for downloading

Post by danielmaximiliano »

Hola RPC:
prompt para

Code: Select all

https://gemini.google.com

Code: Select all

Describe the use of this.:
   oHttp := CreateObject( "WinHttp.WinHttpRequest.5.1" )
ejemplo cmd y GUI hmg
Attachments
BseIndia API.rar
(4.28 MiB) Downloaded 4 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
Post Reply