Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/areal060781/web-scraping
Web scrapping application for weather forecast information and present it in a terminal.
https://github.com/areal060781/web-scraping
beautifulsoup beautifulsoup4 selenium webdataextraction webharvesting webscraping
Last synced: about 21 hours ago
JSON representation
Web scrapping application for weather forecast information and present it in a terminal.
- Host: GitHub
- URL: https://github.com/areal060781/web-scraping
- Owner: areal060781
- Created: 2020-08-16T18:31:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-11T17:38:47.000Z (over 4 years ago)
- Last Synced: 2024-11-19T01:26:08.840Z (2 months ago)
- Topics: beautifulsoup, beautifulsoup4, selenium, webdataextraction, webharvesting, webscraping
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# WeatherTerm
Web scrapping application that scrape weather forecast information from http://weather.com and present it in a terminal.* **BeautifulSoup** to parse HTML and **Selenium** to make requests to the weather website
* **Argparse** module to provide helpful documentation**Requirements**
- [x] Virtualenv
- [x] [PhantomJS](https://phantomjs.org/download.html)### Setup
Inside the project directory create the environment, ctivate it and install the dependencies:;
```shell
python3 -m venv venv
. weatherterm/bin/activate
pip install -r requirements.txt
```
*NOTE:* After downloading PhantomJS, extract the contents inside the weatherterm directory and rename the folder to phantomjs
### Run the application
```
python -m weatherterm --help
``````
usage: weatherterm [-h] -p {WeatherComParser} [-u {Celsius,Fahrenheit}] -a AREA_CODE [-v] [-td] [-5d] [-10d] [-w]Weather info from weather.com on your terminal
optional arguments:
-h, --help show this help message and exit
-u {Celsius,Fahrenheit}, --unit {Celsius,Fahrenheit}
Specify the unit that will be used to display the temperatures.
-v, --version show program's version number and exit
-td, --today Show the weather forecast for the current day
-5d, --fivedays Shows the weather forecast for the next 5 days
-10d, --tendays Shows the weather forecast for the next 10 days
-w, --weekend Shows the weather forecast for the next or current weekendrequire arguments:
-p {WeatherComParser}, --parser {WeatherComParser}
Specify which parser is going to be used to scrape weather information.
-a AREA_CODE, --areacode AREA_CODE
The code area to get the weather broadcast from .It can be obtained at https: // weather.com
```