I’m trying to learn C++ and as a start I’m making a script to analyse fuel prices.
I am doing this by retrieving the HTML data of the gas station of interest utilising CURL. However, one of the companies use a data-react structure which is a bit of challenge to me. I like to do it properly, hence, I prefer to separate the data into its nodes such that I can find the data of interest easily (the fuel price). Googling didn’t make me much wiser, can anybody point me to a (or multiple) pubicly available package(s) suitable for this? I provided a small snippet of the data-react data as an example below. The full element is provided at https://privatebin.net/?8f1be7537d76d200#CFMuNcNR4JHMSQMQSJLFa1NVF4tQ8qjtyW7fatJFt4U.
Many thanks in advance!
(I am using Windows for now but eventually the script will be rewritten for Linux such that it can run on a Rasperry Pi)
type here<div data-react-class="pages/LocationPage" data-react-props="{"config":{"alwaysShowOpeningHours":true,"amenities":{"enabled":["adblue_car","adblue_pack","adblue_truck","air_and_water","amazon_locker","atm","austrian_highway_sticker","baby_change_facilities","bakery_shop","billa_unterwegs","cafe","car_wash_mpay","carwash","carwash_m_pay","clubsmart_card","conveyor","conveyor_and_jet","credit_card","czech_highway_sticker","deli_by_shell","deli_cafe","deli2go","fleet_card_dkv","fleet_card_eni","fleet_card_esso","fleet_card_general","fleet_card_uta","food_offerings","fuel_card","full_service","guarded_car_park","hgv_lane","high_speed_diesel_pump","hot_food","hungarian_highway_sticker","jet","kfc","lottery","loyalty_cards","manual","maut_terminal","migrolino","mobile_payment","motorway_service","navigator_fleet_loyalty_discount","oil_and_lubricants","others","parking_lanes","partner_card","pay_at_pump","restaurant","rollover","rollover_and_jet","sandwich","selectshop","self_service","service_bay","shell_card","shell_club_smart_extra_card","shop","shower","slovak_highway_sticker","snack_food","spar_express","standard_toilet","starbucks","supermarket_fuel_discount","swiss_highway_sticker","toilet","truck_parking","truckport","twenty_four_hour","unmanned","vacuum","wifi","braille_signage","in_store_assistance","ramp_availability","disability_parking","wheelchair_accessible_toilet","shell_energy_rebate","price_guarantee","smart_deal","twotheloo","costa_express","tim_hortons","budgens","waitrose","disability_assistance","deliveroo","uber_eats","jamie_oliver_deli_by_shell","freshii","shell_cafe","recup","mobile_payment_diners","mobile_payment_amex","mobile_payment_visa","mobile_payment_mastercard","mobile_payment_maestro","mobile_payment_cartes_bancaires","mobile_payment_visa_click_to_pay"],"priority":["carwash","twotheloo","costa_express","starbucks","tim_hortons","selectshop","budgens","waitrose","billa_unterwegs","migrolino","disability_assistance","deliveroo","uber_eats","deli_cafe","shell_cafe","deli2go","jamie_oliver_deli_by_shell","deli_by_shell","freshii","amazon_locker","cafe"]}
New_guy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.