This is a simple Python-based weather app that retrieves current weather information for a given city using web scraping. The app scrapes weather data from the wttr.in
website and displays the condition and temperature for the specified location.
- Get current weather information (condition and temperature) for any city.
- No API key required.
- Simple and lightweight solution using web scraping.
- Python 3.x
requests
library
To run the weather app on your local machine, follow these steps:
Clone this repository to your local machine
You need to install the required Python libraries. You can install them using pip
:
pip install requests
Once the dependencies are installed, you can run the app with:
python main.py
The app will prompt you to enter a city name, and it will then display the current weather for that city.
When you run the app, it will ask you to enter the name of a city (e.g., London). Once you input a city, it will display the current weather condition and temperature.
Example:
Enter your location (e.g., London): London
Weather in London: Clear 18°C
This project is open-source and available under the MIT License.
Feel free to fork the repository, create issues, and submit pull requests. Contributions are welcome!
- This app uses the
wttr.in
service for retrieving weather data. Check out wttr.in for more information.