smn

Scraper for Servicio Meteorológico Nacional (Argentina)

Usage no npm install needed!

<script type="module">
  import smn from 'https://cdn.skypack.dev/smn';
</script>

README

Usage (NOT UPDATED)

Weather for one city

var smn = require('smn');
smn.fromCity('Buenos Aires', function(err, weather){
    if (err) {
        return console.log(err && err.stack || err);
    }
    console.log(weather);
});

// output
{
    city: 'Buenos Aires',
    temperature: 25.8,
    feelsLike: null,
    visibility: 10,
    humidity: 84,
    pressure: 1005.8,
    windSpeed: 'Norte  11 Km/h',
    status: 'Nublado',
    icon: 'nublado'
}

Fetching weather for every city

var smn = require('smn');
smn.fetchAll(function(err, array){
    if (err) {
        return console.log(err && err.stack || err);
    }
    console.log(array); // logs an array of weather objects
});