Build Your Own Tariff Change Radar in ~70 Lines of Python
说明与用途
使用约70行Python构建关税变更雷达,自动监控公开仓库并在出现新变更时发送Webhook通知。
问题
Tariff changes occur frequently and need timely notification for import pricing decisions.
结果
The radar runs from cron, watches an open dataset, and pings a webhook when the tariff stack moves, avoiding scraping and API keys.
工作流
- Clone or pull the invoicetariff/invoicetariff repo
- Load data/changelog.json and ruleset‑seed.json
- Compare entry IDs against stored state file
- If new entries exist, send a webhook payload
- Update state file with new IDs
证据
Tariff rates don't sneak up on anyone — tariff changes do.
The raw sources are hostile to automation. Federal Register notices are prose; exclusion lists ship as PDF attachments; CBP publishes CSMS messages on a page that assumes a human is reading it.
Three properties make this watchable: Git is the transport; status splits the timeline; the repo ships the ruleset itself.
- 记录日期: 2026-10-18T16:11:09.396Z