龍里縣天氣日報與穿衣建議技能
為貴州省龍里縣提供每日天氣爬取、穿衣建議生成,支援 OpenClaw cron 定時推送。
# 方式一:從 ClawHub 安裝(若已釋出)
clawdhub install weather-longli
# 方式二:手動安裝
cd ~/.openclaw/skills
git clone <repository> weather-longli
cd ~/.openclaw/skills/weather-longli/scripts
source /path/to/your/venv/bin/activate # 如有虛擬環境
python3 daily_weather_report.py
輸出將直接列印到 stdout,適合 OpenClaw cron 捕獲併發送。
在 OpenClaw 配置中新增(或通過 openclaw cron add):
# cron-example.yaml
name: longli_weather_morning
schedule: "20 7 * * 1-5" # 工作日 7:20
command: |
cd ~/.openclaw/skills/weather-longli/scripts
python3 daily_weather_report.py
編輯 scripts/dress_advice.py 中的 generate_dress_advice 函式,調整溫度閾值與建議文本。
weather-longli/
├── SKILL.md # 本檔案
├── scripts/
│ ├── crawl_longli_weather.py # 爬蟲核心
│ ├── dress_advice.py # 穿衣建議引擎
│ └── daily_weather_report.py # 整合指令碼
├── templates/
│ └── cron-example.yaml # OpenClaw cron 配置示例
└── config.example.yaml # (預留)配置模板
requests、beautifulsoup4小蔥技能7w4.net有更新,你可以訪問看下。
安裝依賴:
pip install requests beautifulsoup4
🌤️ 龍里縣今日天氣(2026-03-15)
溫度:8℃~15℃
天氣:多雲轉晴
風力:東北風 2級
👔 穿衣建議:長袖襯衫+薄外套,早晚溫差大,建議帶件外套備用。
Lancy(根據使用者需求定製)
創建於 2026-03-14
MIT(可根據需要調整)
這是一款功能實用、質量中上的天氣技能。優點是零成本、無需API、文件清晰、程式碼簡單,輸出的穿衣建議也比較貼心。缺點是依賴外部網站穩定性,網頁改版可能導致無法獲取資料,且目前只能查龍里一個地方。整體而言,對於有明確需求的本地使用者足夠好用,但通用性和容錯能力還有提升空間。