This repo contains a weather web scraping C++ script (code and .bat) I made for my dad.
He records and analyzes weather data for our orchard. ๐๐ณ๐๐๐๐
Original Python version repo ๐
This C++ version is also an attempt at adopting (dys)functional programming principles.
- extracts weather data from freemeteo.ro
- exports the data into Excel
Make sure the excel files are in the same folder from which you run the script (be it .exe or .bat).
Dev:
ย ย ย ย ย ย I used MinGW64 and MSYS2.
ย ย ย ย ย ย Install packages: curl
gumbo
xlnt
ย ย ย ย ย ย Compile to .exe: g++ -o weather_script main.cc -lcurl -lgumbo -lxlnt
ย ย ย ย ย ย or use your preferred build system
User:
-
download
Weather_Scraping.zip
from Releasesor copy what's inside the
dist
folder -
replace
weather_data.xlsx
with your own excelor use it (skip the next 2 steps)
-
add the date (dd.mm.yyyy) after which you want to get data
-
update
config.xlsx
- your excel name
- your sheet name
- the letter(s) header of the first (date) column
-
run
weather_script.bat
and wait for the console window to close -
PROFIT ๐๐๐
The CA certificate for the data request can expire. In that case, you can replace it.
The certificate is in the certs
folder. You can download certificates here.