0

I would like to scrape information from https://bet.hu/oldalak/adatletoltes using selenium in python. I have an issue with a pair of elements that are linked to each other. There are two select statements, a) with id="promptCategoryInput" and b) id='promptShareInput'. Manually the procedure looks like this:

  • b) is empty
  • you click on a) and select your choice from the dropdown by clicking on it, then
  • b) gets populated with items corresponding to your choice in a) and then you can select from b).

When I do it with selenium, first I choose my option from a) by doing this:

from selenium import webdriver
from selenium.webdriver.support.ui import Select

url = 'https://bet.hu/oldalak/adatletoltes'
driver = webdriver.Chrome()
driver.get(url)
element = Select(driver.find_element_by_id("promptCategoryInput"))
element.select_by_value('W_RESZVENYA')

This works fine, I can see the selected option appearing in the dropdown menu as selected. The problem is that the b) dropdown does not get populated and I cannot repeat the same procedure to it to make a selection.

I am not an expert of web development but I guess, when we do manually a selection from a) dropdown it triggers a js function that reads a database and populates the b) dropdown. But I don't know how to do it through selenium with python. Could you help me out with that?

Many thanks.

1 Answer 1

1

The code below will return to you the values you are looking for:

import requests

r = requests.get('https://bse.hu/pages/data-download/$rspid0x117390x12/$rimainCategory?marketType=prompt')
if r.status_code == 200:
    prompts = r.json()
    ids = [p['id'] for p in prompts]
    for _id in ids:
        print('Data for id = {}:'.format(_id))
        url = 'https://bse.hu/pages/data-download/$rspid0x117390x12/$riinstrument?marketType=prompt&groupId={}&startDate=2019.12.08.&endDate=&resolution=ONE_DAY'.format(_id)
        r = requests.get(url)
        if r.status_code == 200:
            data = r.json()
            print(data)

output

Data for id = W_RESZVENYA:
[{'id': 3564, 'code': '4IG'}, {'id': 6494, 'code': 'ALTEO'}, {'id': 4042, 'code': 'ANY'}, {'id': 6329, 'code': 'APPENINN'}, {'id': 8208, 'code': 'AUTOWALLIS'}, {'id': 424, 'code': 'BIF'}, {'id': 6515, 'code': 'CIGPANNONIA'}, {'id': 9864, 'code': 'DUNAHOUSE'}, {'id': 4338, 'code': 'GSPARK'}, {'id': 7217, 'code': 'MASTERPLAST'}, {'id': 518, 'code': 'MOL'}, {'id': 511, 'code': 'MTELEKOM'}, {'id': 540, 'code': 'OPUS'}, {'id': 528, 'code': 'OTP'}, {'id': 546, 'code': 'PANNERGY'}, {'id': 604, 'code': 'RABA'}, {'id': 608, 'code': 'RICHTER'}, {'id': 3263, 'code': 'TAKAREKJZB'}, {'id': 11141, 'code': 'WABERERS'}, {'id': 639, 'code': 'ZWACK'}]
Data for id = W_RESZVENYB:
[{'id': 6685, 'code': 'AKKO'}, {'id': 1098, 'code': 'CSEPEL'}, {'id': 703, 'code': 'ELMU'}, {'id': 702, 'code': 'EMASZ'}, {'id': 4664, 'code': 'ENEFI'}, {'id': 748, 'code': 'ESTMEDIA'}, {'id': 3168, 'code': 'FORRAS/OE'}, {'id': 3167, 'code': 'FORRAS/T'}, {'id': 7216, 'code': 'FUTURAQUA'}, {'id': 756, 'code': 'KPACK'}, {'id': 5916, 'code': 'KULCSSOFT'}, {'id': 12625, 'code': 'MKBBANK'}, {'id': 6005, 'code': 'NORDTELEKOM'}, {'id': 477, 'code': 'NUTEX'}, {'id': 6581, 'code': 'ORMESTER'}, {'id': 6461, 'code': 'OTT1'}, {'id': 6907, 'code': 'SET'}]
Data for id = W_RESZVENYT:
[{'id': 5951, 'code': 'FINEXT'}, {'id': 12096, 'code': 'FINEXT B'}, {'id': 10745, 'code': 'UBM'}]
Data for id = W_RESZV_BA:
[{'id': 11852, 'code': 'BILK'}]
Data for id = W_ELKULONITE:
[{'id': 641, 'code': 'EHEP'}]
Data for id = W_ETF:
[{'id': 4465, 'code': 'ETFBUXOTP'}]
Data for id = W_CERTI:
[{'id': 12853, 'code': 'EBDAX03'}, {'id': 12854, 'code': 'EBGOLD03'}, {'id': 12855, 'code': 'EBSILVER03'}, {'id': 12856, 'code': 'EBWTIOIL04'}, {'id': 4961, 'code': 'RCCECE'}, {'id': 4958, 'code': 'RCDJEUSTX50'}, {'id': 4962, 'code': 'RCGOLD'}, {'id': 4963, 'code': 'RCSETX'}, {'id': 4960, 'code': 'RCSP500'}]
Data for id = W_CERTITB:
[{'id': 12355, 'code': 'EBBMWTL05'}, {'id': 11710, 'code': 'EBBMWTS02'}, {'id': 12107, 'code': 'EBBMWTS03'}, {'id': 12168, 'code': 'EBBMWTS04'}, {'id': 11973, 'code': 'EBBUXTL24'}, {'id': 11974, 'code': 'EBBUXTL25'}, {'id': 12222, 'code': 'EBBUXTL26'}, {'id': 12978, 'code': 'EBBUXTL29'}, {'id': 12979, 'code': 'EBBUXTL30'}, {'id': 12296, 'code': 'EBBUXTS23'}, {'id': 12481, 'code': 'EBBUXTS24'}, {'id': 10389, 'code': 'EBCBKTL10'}, {'id': 12785, 'code': 'EBCBKTL15'}, {'id': 12786, 'code': 'EBCBKTL16'}, {'id': 12787, 'code': 'EBCBKTL17'}, {'id': 12788, 'code': 'EBCBKTL18'}, {'id': 8827, 'code': 'EBCBKTS05'}, {'id': 11577, 'code': 'EBCBKTS10'}, {'id': 11907, 'code': 'EBCBKTS11'}, {'id': 12789, 'code': 'EBCBKTS12'}, {'id': 12790, 'code': 'EBCBKTS13'}, {'id': 12061, 'code': 'EBDAITL04'}, {'id': 12356, 'code': 'EBDAITL06'}, {'id': 11711, 'code': 'EBDAITS01'}, {'id': 11712, 'code': 'EBDAITS02'}, {'id': 8444, 'code': 'EBDAXOETL01'}, {'id': 12827, 'code': 'EBDAXTL102'}, {'id': 12953, 'code': 'EBDAXTL103'}, {'id': 12954, 'code': 'EBDAXTL104'}, {'id': 12351, 'code': 'EBDAXTL96'}, {'id': 12352, 'code': 'EBDAXTL97'}, {'id': 12482, 'code': 'EBDAXTL98'}, {'id': 12571, 'code': 'EBDAXTS85'}, {'id': 12955, 'code': 'EBDAXTS87'}, {'id': 11983, 'code': 'EBEURBUNDL26'}, {'id': 11984, 'code': 'EBEURBUNDL27'}, {'id': 12347, 'code': 'EBEURBUNDL28'}, {'id': 12760, 'code': 'EBEURBUNDL29'}, {'id': 12763, 'code': 'EBEURBUNDS34'}, {'id': 12828, 'code': 'EBEURBUNDS35'}, {'id': 12732, 'code': 'EBEURHUFTL36'}, {'id': 12733, 'code': 'EBEURHUFTL37'}, {'id': 12734, 'code': 'EBEURHUFTL38'}, {'id': 12738, 'code': 'EBEURHUFTS48'}, {'id': 12739, 'code': 'EBEURHUFTS49'}, {'id': 12745, 'code': 'EBEURUSDTL28'}, {'id': 12746, 'code': 'EBEURUSDTL29'}, {'id': 12748, 'code': 'EBEURUSDTS23'}, {'id': 12749, 'code': 'EBEURUSDTS24'}, {'id': 12750, 'code': 'EBEURUSDTS25'}, {'id': 12751, 'code': 'EBGBPHUFTL11'}, {'id': 12752, 'code': 'EBGBPHUFTL12'}, {'id': 12754, 'code': 'EBGBPHUFTS11'}, {'id': 12000, 'code': 'EBGOLDTL001'}, {'id': 12044, 'code': 'EBGOLDTL003'}, {'id': 12358, 'code': 'EBGOLDTL004'}, {'id': 12770, 'code': 'EBGOLDTL005'}, {'id': 7533, 'code': 'EBGOLDTL17'}, {'id': 12773, 'code': 'EBGOLDTS004'}, {'id': 12783, 'code': 'EBGOLDTS005'}, {'id': 11991, 'code': 'EBHENHUBTL45'}, {'id': 12771, 'code': 'EBHENHUBTL50'}, {'id': 12236, 'code': 'EBHENHUBTS43'}, {'id': 12241, 'code': 'EBHENHUBTS44'}, {'id': 12242, 'code': 'EBHENHUBTS45'}, {'id': 12349, 'code': 'EBHENHUBTS46'}, {'id': 12350, 'code': 'EBHENHUBTS47'}, {'id': 12577, 'code': 'EBHENHUBTS48'}, {'id': 9052, 'code': 'EBMOLTL15'}, {'id': 9386, 'code': 'EBMOLTL16'}, {'id': 9540, 'code': 'EBMOLTL17'}, {'id': 10191, 'code': 'EBMOLTL19'}, {'id': 10388, 'code': 'EBMOLTL20'}, {'id': 10446, 'code': 'EBMOLTL21'}, {'id': 10770, 'code': 'EBMOLTL22'}, {'id': 11085, 'code': 'EBMOLTL23'}, {'id': 11585, 'code': 'EBMOLTL29'}, {'id': 12067, 'code': 'EBMOLTL33'}, {'id': 12102, 'code': 'EBMOLTL34'}, {'id': 11448, 'code': 'EBMOLTS18'}, {'id': 12289, 'code': 'EBMOLTS20'}, {'id': 12290, 'code': 'EBMOLTS21'}, {'id': 7884, 'code': 'EBMTELTL03'}, {'id': 8533, 'code': 'EBMTELTL04'}, {'id': 8873, 'code': 'EBMTELTL05'}, {'id': 10445, 'code': 'EBMTELTL06'}, {'id': 11502, 'code': 'EBMTELTL09'}, {'id': 12284, 'code': 'EBMTELTL10'}, {'id': 7333, 'code': 'EBMTELTS01'}, {'id': 12497, 'code': 'EBMTELTS05'}, {'id': 12498, 'code': 'EBMTELTS06'}, {'id': 12871, 'code': 'EBOPUSTL03'}, {'id': 12872, 'code': 'EBOPUSTL04'}, {'id': 12873, 'code': 'EBOPUSTL05'}, {'id': 7108, 'code': 'EBOTPTL08'}, {'id': 9387, 'code': 'EBOTPTL15'}, {'id': 9499, 'code': 'EBOTPTL16'}, {'id': 9541, 'code': 'EBOTPTL17'}, {'id': 9627, 'code': 'EBOTPTL18'}, {'id': 9934, 'code': 'EBOTPTL19'}, {'id': 10186, 'code': 'EBOTPTL20'}, {'id': 10606, 'code': 'EBOTPTL22'}, {'id': 10635, 'code': 'EBOTPTL23'}, {'id': 10682, 'code': 'EBOTPTL24'}, {'id': 11142, 'code': 'EBOTPTL27'}, {'id': 11267, 'code': 'EBOTPTL28'}, {'id': 12103, 'code': 'EBOTPTL33'}, {'id': 12224, 'code': 'EBOTPTL34'}, {'id': 12225, 'code': 'EBOTPTL35'}, {'id': 12286, 'code': 'EBOTPTL36'}, {'id': 12767, 'code': 'EBOTPTL39'}, {'id': 12906, 'code': 'EBOTPTL40'}, {'id': 12907, 'code': 'EBOTPTL41'}, {'id': 12950, 'code': 'EBOTPTL42'}, {'id': 12951, 'code': 'EBOTPTS31'}, {'id': 12952, 'code': 'EBOTPTS32'}, {'id': 8876, 'code': 'EBRCHTL03'}, {'id': 9462, 'code': 'EBRCHTL04'}, {'id': 9629, 'code': 'EBRCHTL05'}, {'id': 12068, 'code': 'EBRCHTL13'}, {'id': 12981, 'code': 'EBRCHTL18'}, {'id': 10807, 'code': 'EBRCHTS08'}, {'id': 11059, 'code': 'EBRCHTS09'}, {'id': 11640, 'code': 'EBRCHTS10'}, {'id': 12002, 'code': 'EBSILVTL001'}, {'id': 12064, 'code': 'EBSILVTL004'}, {'id': 12772, 'code': 'EBSILVTL006'}, {'id': 12782, 'code': 'EBSILVTL007'}, {'id': 12784, 'code': 'EBSILVTS004'}, {'id': 12977, 'code': 'EBSILVTS005'}, {'id': 12339, 'code': 'EBSPTL45'}, {'id': 12340, 'code': 'EBSPTL46'}, {'id': 12341, 'code': 'EBSPTL47'}, {'id': 12474, 'code': 'EBSPTL48'}, {'id': 12475, 'code': 'EBSPTL49'}, {'id': 12759, 'code': 'EBSPTL51'}, {'id': 12975, 'code': 'EBSPTL52'}, {'id': 12976, 'code': 'EBSPTS46'}, {'id': 12735, 'code': 'EBUSDHUFTL29'}, {'id': 12736, 'code': 'EBUSDHUFTL30'}, {'id': 12741, 'code': 'EBUSDHUFTS34'}, {'id': 12829, 'code': 'EBUSDHUFTS35'}, {'id': 9984, 'code': 'EBVWTL02'}, {'id': 10241, 'code': 'EBVWTL03'}, {'id': 10799, 'code': 'EBVWTL04'}, {'id': 10800, 'code': 'EBVWTL05'}, {'id': 11578, 'code': 'EBVWTS05'}, {'id': 12298, 'code': 'EBWTIOILTL79'}, {'id': 12342, 'code': 'EBWTIOILTL80'}, {'id': 12477, 'code': 'EBWTIOILTL81'}, {'id': 11998, 'code': 'EBWTIOILTS74'}, {'id': 12166, 'code': 'EBWTIOILTS75'}, {'id': 12220, 'code': 'EBWTIOILTS76'}, {'id': 12221, 'code': 'EBWTIOILTS77'}, {'id': 12775, 'code': 'EBWTIOILTS81'}]
Data for id = W_BEFJEGY:
[{'id': 12537, 'code': 'KHEBRUG2'}, {'id': 10057, 'code': 'KHELELM1'}, {'id': 12201, 'code': 'KHEROSEU1'}, {'id': 11475, 'code': 'KHEURTRUG1'}, {'id': 9974, 'code': 'KHFOGYJAV1'}, {'id': 11243, 'code': 'KHGENVALL1'}, {'id': 10280, 'code': 'KHGYERMEK1'}, {'id': 9887, 'code': 'KHGYOGYSZ2'}, {'id': 10208, 'code': 'KHGYOGYSZ3'}, {'id': 10593, 'code': 'KHGYOGYVC1'}, {'id': 12079, 'code': 'KHNKCS6'}, {'id': 11893, 'code': 'KHPREBRUG1'}, {'id': 10352, 'code': 'KHPRGOND1'}, {'id': 11153, 'code': 'KHPRGYOGY4'}, {'id': 10775, 'code': 'KHPRINFBI1'}, {'id': 10961, 'code': 'KHPRINGVC1'}, {'id': 11562, 'code': 'KHPRNKCS3'}, {'id': 11598, 'code': 'KHPRNKCS4'}, {'id': 11664, 'code': 'KHPRNKCS5'}, {'id': 10960, 'code': 'KHPRNKCSA1'}, {'id': 11044, 'code': 'KHPRNKCSA2'}, {'id': 11597, 'code': 'KHPROLRUG3'}, {'id': 11045, 'code': 'KHPRRAAD1'}, {'id': 10456, 'code': 'KHPRRANG1'}, {'id': 11394, 'code': 'KHPRSPSZP1'}, {'id': 10857, 'code': 'KHPRTTDOL1'}, {'id': 11154, 'code': 'KHPRTTDOL2'}, {'id': 10693, 'code': 'KHPRVC10'}, {'id': 10774, 'code': 'KHPRVC11'}, {'id': 9821, 'code': 'KHSZAKHOZ7'}, {'id': 12726, 'code': 'KHTELERUG1'}, {'id': 12846, 'code': 'KHTELERUG2'}, {'id': 12424, 'code': 'KHTVGYOGY5'}, {'id': 12620, 'code': 'KHTVNKCS7'}, {'id': 12013, 'code': 'KHUSDRUG'}, {'id': 9554, 'code': 'KHVAZSIA1'}, {'id': 10668, 'code': 'MKBBESZHOZ'}, {'id': 10780, 'code': 'MKBEHOZAM'}, {'id': 10371, 'code': 'MKBELHETO'}, {'id': 9673, 'code': 'MKBFELKIN3'}, {'id': 10508, 'code': 'MKBHOZAMD'}, {'id': 9961, 'code': 'MKBMEDICINA'}, {'id': 10249, 'code': 'MKBNEMET'}, {'id': 9400, 'code': 'MKBTRIPLUSZ'}, {'id': 9525, 'code': 'MKBVEZOLAJ'}, {'id': 9816, 'code': 'MKBVILAGHALO'}, {'id': 10597, 'code': 'OTPARANYVAL'}, {'id': 9851, 'code': 'OTPFEJLVIL2'}, {'id': 10152, 'code': 'OTPGLOBALMIX'}, {'id': 9754, 'code': 'OTPREALAL2'}, {'id': 9858, 'code': 'OTPREALAL3'}, {'id': 9995, 'code': 'OTPREALAL4'}, {'id': 10368, 'code': 'OTPREALALP'}, {'id': 11260, 'code': 'OTPREALAP3'}, {'id': 10139, 'code': 'OTPREALFU4'}, {'id': 10575, 'code': 'OTPREALFU5'}, {'id': 9996, 'code': 'OTPSZINER10'}, {'id': 10699, 'code': 'OTPSZINER11'}, {'id': 10867, 'code': 'OTPSZINER12'}, {'id': 11003, 'code': 'OTPSZINER13'}, {'id': 11135, 'code': 'OTPSZINER14'}, {'id': 11320, 'code': 'OTPSZINER15'}, {'id': 11449, 'code': 'OTPSZINER16'}, {'id': 9751, 'code': 'OTPSZINERGI9'}]
Data for id = W_KARPJEGY:
[{'id': 492, 'code': 'KARPOT'}]
Data for id = W_ALLAMKOTV:
[{'id': 3325, 'code': '2020/A'}, {'id': 9117, 'code': '2020/B'}, {'id': 10784, 'code': '2020/C'}, {'id': 9382, 'code': '2021/A'}, {'id': 10006, 'code': '2021/B'}, {'id': 11599, 'code': '2021/C'}, {'id': 6635, 'code': '2022/A'}, {'id': 10786, 'code': '2022/B'}, {'id': 12436, 'code': '2022/C'}, {'id': 4486, 'code': '2023/A'}, {'id': 11549, 'code': '2023/B'}, {'id': 9469, 'code': '2024/B'}, {'id': 11865, 'code': '2024/C'}, {'id': 8617, 'code': '2025/B'}, {'id': 12937, 'code': '2025/C'}, {'id': 11072, 'code': '2026/D'}, {'id': 10008, 'code': '2027/A'}, {'id': 6694, 'code': '2028/A'}, {'id': 12413, 'code': '2030/A'}, {'id': 9534, 'code': '2031/A'}, {'id': 11602, 'code': '2038/A'}]
Data for id = W_KINCSTARJ:
[{'id': 12337, 'code': 'D191231'}, {'id': 12450, 'code': 'D200226'}, {'id': 12563, 'code': 'D200429'}, {'id': 12665, 'code': 'D200624'}, {'id': 12780, 'code': 'D200826'}, {'id': 12892, 'code': 'D201021'}]
Data for id = W_VALLKOTVPI:
[]
Data for id = W_VALLKOTV:
[{'id': 11113, 'code': 'ALTEO2020I'}, {'id': 12972, 'code': 'ALTEO2022II'}, {'id': 12280, 'code': 'BOC091720001'}, {'id': 12279, 'code': 'BOC091720002'}, {'id': 11165, 'code': 'EXIM20201'}, {'id': 11405, 'code': 'EXIM20221'}, {'id': 12471, 'code': 'IIB2022/IHUF'}, {'id': 12896, 'code': 'IIB2022/II'}, {'id': 9779, 'code': 'MFB202006/1'}, {'id': 11822, 'code': 'MFB202006/2'}, {'id': 9846, 'code': 'MFB202101/1'}, {'id': 12809, 'code': 'MFB202104/1'}, {'id': 12077, 'code': 'MFB202110/1'}, {'id': 11125, 'code': 'MFB202210/1'}, {'id': 12847, 'code': 'MFB202311/1'}, {'id': 12399, 'code': 'MFB202406/1'}, {'id': 11383, 'code': 'MFB202710/1'}, {'id': 12621, 'code': 'MFBEU2006/1'}, {'id': 12964, 'code': 'MFBEU2109/1'}, {'id': 12673, 'code': 'MFBEU2209/1'}, {'id': 12310, 'code': 'OTPDKHUF20I'}, {'id': 12311, 'code': 'OTPDKHUF21I'}, {'id': 12312, 'code': 'OTPDKHUF22I'}, {'id': 12313, 'code': 'OTPDKHUF23I'}, {'id': 12634, 'code': 'OTPDKHUF24I'}, {'id': 12633, 'code': 'OTPDKHUF25I'}, {'id': 12323, 'code': 'OTPVU119VIII'}, {'id': 12435, 'code': 'OTPVU120I'}, {'id': 12522, 'code': 'OTPVU120II'}, {'id': 12605, 'code': 'OTPVU120III'}, {'id': 12674, 'code': 'OTPVU120IV'}, {'id': 12791, 'code': 'OTPVU120V'}, {'id': 12868, 'code': 'OTPVU120VI'}, {'id': 12946, 'code': 'OTPVU120VII'}, {'id': 10654, 'code': 'TUND2030'}, {'id': 12009, 'code': 'WING2021/I'}, {'id': 12685, 'code': 'WING2022/I'}, {'id': 12686, 'code': 'WING2024/I'}, {'id': 12689, 'code': 'WING2024/II'}]
Data for id = W_JELZLEV:
[{'id': 10623, 'code': 'EJBFN21/A'}, {'id': 11671, 'code': 'EJBFN21/B'}, {'id': 12538, 'code': 'EJBFN22/A'}, {'id': 11858, 'code': 'EJBFN23/A'}, {'id': 12848, 'code': 'EJBFN24/A'}, {'id': 12536, 'code': 'EJBFN26/A'}, {'id': 11672, 'code': 'EJBFN28/A'}, {'id': 12923, 'code': 'EJBFN29/A'}, {'id': 8084, 'code': 'FJ20NF01'}, {'id': 11051, 'code': 'FJ20NF02'}, {'id': 9467, 'code': 'FJ20NV01'}, {'id': 10858, 'code': 'FJ20NV02'}, {'id': 11052, 'code': 'FJ20NV03'}, {'id': 11053, 'code': 'FJ20NV04'}, {'id': 8619, 'code': 'FJ21NF01'}, {'id': 10097, 'code': 'FJ21NV01'}, {'id': 10833, 'code': 'FJ22NF01'}, {'id': 10962, 'code': 'FJ22NV01'}, {'id': 11657, 'code': 'FJ23NF01'}, {'id': 11714, 'code': 'FJ23NF02'}, {'id': 10222, 'code': 'FJ26NF01'}, {'id': 11715, 'code': 'FJ28NF01'}, {'id': 12087, 'code': 'KHJZBF23'}, {'id': 10882, 'code': 'OJB2021/I'}, {'id': 11734, 'code': 'OJB2023/I'}, {'id': 12085, 'code': 'OJB2024/A'}, {'id': 12089, 'code': 'OJB2024/B'}, {'id': 12143, 'code': 'OJB2024/II'}, {'id': 3637, 'code': 'OJB20/I'}, {'id': 6873, 'code': 'OJB20/II'}, {'id': 5798, 'code': 'OJB25/I'}, {'id': 12251, 'code': 'TJ24NF01'}, {'id': 12492, 'code': 'TJ24NF02'}, {'id': 12554, 'code': 'TJ24NV01'}, {'id': 10713, 'code': 'UCJBF21/A'}, {'id': 8822, 'code': 'UCJBF22/A'}, {'id': 11720, 'code': 'UCJBF23/A'}, {'id': 12159, 'code': 'UCJBF24/A'}, {'id': 11354, 'code': 'UCJBF27/A'}, {'id': 12262, 'code': 'UCJBF28/A'}, {'id': 6159, 'code': 'UCJBV20/A'}]
Data for id = W_SME:
[{'id': 12162, 'code': 'CYBERG'}, {'id': 12646, 'code': 'GOPD'}, {'id': 12110, 'code': 'MEGAKRAN'}]
Data for id = W_XBOND:
[]

In order to get the prices you should invoke HTTP POST to https://bse.hu/pages/data-download/$rspid0x117390x12/$rihistoricalGenerator?_csrf=43b5d63c-9032-42f0-8a90-ac3ec3a05305

The POST body should contain the selections you did in the UI. Example

{"startingValue":"2019.04.","endingValue":"","resolution":"ONE_MONTH","market":"PROMPT","format":"CSV","type":"CLOSING","currentCategory":"W_RESZVENYT","selectionList":[{"category":"Equities T","selectedInstruments":[{"id":"10745","code":"UBM"}]}]}

Try to combine the fist part of my answer with the second one and you will be able to get all prices.

Sign up to request clarification or add additional context in comments.

7 Comments

Thanks for this solution. It helped me a bit to understand what is going on behind the scene, but my final aim would be to download price data for a given stock. That is why I wanted to click on the dropdown menu and select an instrument. But if you know a direct way to communicate to the database that would be awsome.
Please describe the UI flow for "download price data for a given stock".
Well if I do it by clicking on the webpage, this is the process: 1) set time range resolution - from day to day, 2) I set the two dates from and to, 3) Select excel as data format, 4) set data type to be detailed, 5) click on Primary market, 6) select Equities prime, 7) click on Instrument field 8) select an instrument, like 4IG, 9) and finally click download button
The description is not detailed enough ... Please describe every step you do until you get the price data of a given stock.
There is not much more that I do, but I can add a few things to finalise: 1) set time range resolution - from day to day, 2) I set the two dates, like from=2019.10.10. and to=2019.11.11., 3) Select excel as data format, 4) set data type to be Detailed (values, averages, volume), 5) click on Primary market, 6) select Equities prime from Category field, 7) click on Instrument field 8) select an instrument, like 4IG, 9) and finally click Download button just below the input field that contains 4IG.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.