SuperAPI AI 工具集

google-trends-ath-detector

通用与其它

查看项目

更新于 10-16 06:19

技能介绍

用途:该技能专注于 Google Trends 数据抓取与量化分析,用 Selenium 模拟真人浏览器行为,判断某主题搜索趋势是否创历史新高(ATH)或出现异常飙升,并给出信号分型,供用户自行解读。\n\n主要能力:抓取 Google Trends 时间序列;ATH 判定按 latest_value >= max(history) * 0.98;异常判定按 zscore >= threshold(默认 2.5);信号分型分为季节性尖峰(每年固定月份重复)、事件驱动冲击(短期尖峰、z-score 高)、结构性转变(趋势线上移、持续高位);可选提取 related queries 作为驱动因素参考;支持多主题趋势共振比较。\n\n使用方式:安装依赖 pip install selenium webdriver-manager beautifulsoup4 lxml loguru。Python API 可 from scripts.trend_fetcher import fetch_trends, analyze_ath,调用 fetch_trends(topic, geo, timeframe) 与 analyze_ath(data, threshold=2.5)。CLI 用法:python scripts/trend_fetcher.py --topic "Health Insurance" --geo US --output ./output/health_insurance.json;可用 --compare 比较主题、--no-related 跳过关联查询、--no-headless 显示浏览器、--csv 从已下载 CSV 分析(--csv auto 自动查找 Downloads)、--login-wait 控制登录等待秒数。另有 Detect/Analyze/Compare 三种工作流。\n\n适用场景:关注搜索热度是否创历史新高、判断飙升是季节、事件还是结构性转变,以及多主题趋势对比。\n\n限制:资料未提供官方定价、平台支持范围与效果保证;抓取行为与登录/2FA 交互需用户自备环境,输出为描述性量化结果,需用户结合专业知识解读。