从fmi.fi获取和解析天气信息
fmiweather的Python项目详细描述
这是用于fmi网站的非正式解析器-屏幕刮刀-实现。使用前请检查可能的条件和条款。这可能会打破每一个网站的更新。
安装
pip install fmiweather
用法
from fmiweather import FmiWeather weather = FmiWeather() weather.download_content("http://ilmatieteenlaitos.fi/saa/helsinki/s%C3%B6rn%C3%A4inen") print weather.parse_next_days() # Parses daily forecasts print weather.parse_next_hours() # Parses hourly forecast print weather.parse_observations() # Parses observations