🇹🇷 Türkçe README için tıklayın
A Python tool to fetch the latest METAR or SPECI data for a given station code using data from Turkey's Meteorology General Directorate (MGM). The tool fetches the latest METAR or SPECI report, whichever is more recent.
- Fetches the latest METAR or SPECI data for a specific station.
- Parses HTML content to extract METAR and SPECI information.
# Clone the repository
git clone https://github.com/hasanbahadirkoca/metar-fetcher.git
cd metar-fetcher
# Install dependencies
pip install requests
from metar_fetcher import MetarFetcher
station_code = "LTCB" # Replace with your desired station code
fetcher = MetarFetcher(station_code)
try:
print("Latest METAR:", fetcher.fetch_latest_metar())
except Exception as e:
print("Error:", str(e))
Latest METAR: LTCB 281250Z 24004KT 9999 FEW020 SCT030 BKN100 15/10 Q1018
Contributions are welcome! Please open an issue or submit a pull request with improvements.
This project is licensed under the MIT License. See the LICENSE file for details.