Coder Social home page Coder Social logo

cpp-weather-scraping's Introduction

fast-weather-scraping

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.

What does it do?

  • extracts weather data from freemeteo.ro
  • exports the data into Excel

Setup

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:

  1. download Weather_Scraping.zip from Releases

    or copy what's inside the dist folder

  2. replace weather_data.xlsx with your own excel

    or use it (skip the next 2 steps)

  3. add the date (dd.mm.yyyy) after which you want to get data

  4. update config.xlsx

    • your excel name
    • your sheet name
    • the letter(s) header of the first (date) column
  5. run weather_script.bat and wait for the console window to close

  6. 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.

cpp-weather-scraping's People

Contributors

hornflakes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.