A tiny Pyhton script to scrape the windguru date UI for your user (via cookie-id)
- Open your browser and navigate to https://www.windguru.cz/
- Login to Windguru.cz via the bottom right login button e.g. via Google Single-Sign-On
- Open one of the forecast pages for a spot in your browser e.g. https://www.windguru.cz/43
- Open your Developer Console to extract the
idu
andlogin_md5
from the cookie e.g. for Chrome in Mac ⌥ + ⌘ + J (see example image below for another spot with number 559365)- Go to the Network tab
- Reload the page
- Select the second entry in the list called like the number of your spot e.g. 43
- Go to the Cookies detail tab
- Search for
idu
andlogin_md5
and copy it
- Run the script as shown below with your
idu
andlogin_md5
as parameters
The easiest way to run the script is via Docker (see also the provided Dockerfile)
docker build -t windguru-date-cli .
You need to share a folder to generate the images.
docker run -it -v $(pwd)/generated:/app/generated windguru-date-cli --idu <your-idu> --login_md5 <your-login_md5> \
--spots "Tarifa" \
--spots "El Gouna" \
--month-from 11 \
--day-from 28 \
--month-to 12 \
--day-to 5 \
--years 2018 \
--years 2019 \
--years 2020 \
--years 2021
You can call the command with different parameters.
Use: python app.py --help
for a complete description.
As an example see:
python app.py --idu <your-idu> --login_md5 <your-login_md5> \
--spots "Tarifa" \
--spots "Essaouira" \
--month-from 11 \
--day-from 28 \
--month-to 12 \
--day-to 5 \
--years 2018 \
--years 2019 \
--years 2020 \
--years 2021
As a visual example (!caution login_md5
is missing):