Weather Fetch
中国天气数据抓取工具 - 从 weathercn.com 抓取实时天气数据,支持全国城市。
Latest: v1.0.0
Initial release of weather-fetch
- Fetches real-time weather data from weathercn.com for any city in China
- Outputs temperature, humidity, pressure, visibility, sunrise/sunset times, wind, and AQI
- Uses Playwright for automated data extraction
- Simple command-line usage with city name as input
- Free to use, open source, donations welcome
🌤️ Weather Fetch - 中国天气抓取工具
从 weathercn.com 抓取中国城市实时天气数据。
功能
- 支持全国城市天气查询
- 提取温度、湿度、气压、能见度等数据
- 日出日落时间
- AQI空气质量指数
- 使用 Playwright 自动化抓取
使用方法
python3 scripts/weather_fetch.py 城市名
示例
python3 scripts/weather_fetch.py 苍南
python3 scripts/weather_fetch.py 梧州
输出
{
"city": "苍南县",
"temp": "20",
"temp_high": "26",
"temp_low": "18",
"weather": "阴",
"humidity": "66",
"feels_like": "19",
"pressure": "1011",
"visibility": "22.0",
"wind": "西南风3级",
"sunrise": "05:19",
"sunset": "18:32",
"aqi": "41",
"aqi_level": "优"
}
打赏
如果觉得好用,欢迎支持米米的服务器费用!
