Fingrid Datahub API for Python
The code uses the Selenium library and the requests to scrape the data from the Fingrid Datahub. Selenium is used to get cookies for the session.
cookies = get_cookies() # get_cookies() gets cookies with Selenium
or
cookies = get_cookies("cookies.json") # get cookies from a file
session = get_session()
cookies_to_session(session, cookies)
customerData = get_customer_data(session)
meteringPoints = get_metering_points(session)
data = get_consumption_data(session, meteringPoint, start, end)
ok = logout(session)
datahub.py contains an example of how to use the functions.