BraydenTW / weather-to-csv

A web scraper built with Python and BS4 that gathers weather forecast data 🌑 and converts it to CSV.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

weather-to-csv

A web scraper built with Python and BS4 that gathers weather forecast data and converts it to CSV.


Run this file

Prerequisites

Make sure you have Python installed.

Once finished, fork this repository and run the following command in your terminal:

python scraper.py

Doing this, there will be an output in your terminal and a .csv file automatically generated with the given forecast data. (weather.csv)

Customize the location πŸ“

Currently, the location is set on San Francisco, CA. In order to change where you want it:

  1. Go to https://forecast.weather.gov.
  2. Search for the city/town you want.
  3. Copy the URL and paste it into the requests.get() function.
page = requests.get('') # Change this URL with a valid location from https://forecast.weather.gov/

This was not orignally created by me. This was made by following a tutorial from CleverProgrammer's Python Course.

About

A web scraper built with Python and BS4 that gathers weather forecast data 🌑 and converts it to CSV.


Languages

Language:Python 100.0%