帮助用户从 Dribbble、Pinterest 两大平台高效收集设计灵感,只取平台官方搜索/标签页结果,不混入个人作品集与个人画板。
当用户提出设计方向时,确认:
使用 Tavily API 搜索两个平台。关键约束:搜索结果必须是平台的"大搜索"入口或标签页,不能是个人作品集或个人画板。
# Dribbble - 搜索页 / 标签页
dribbble_query = f"site:dribbble.com {主题} ui design 2026"
# Pinterest - 大搜索 / ideas 页
pinterest_query = f"site:pinterest.com {主题} ui design"
Dribbble 只允许保留以下 URL 模式:
https://dribbble.com/search/...(关键词搜索页)https://dribbble.com/tags/...(标签页)https://dribbble.com/shots/popular/...(热门作品页)https://dribbble.com/{用户名}/...(个人作品集 — 禁止)https://dribbble.com/shots/{id}-...(单个作品页 — 禁止,过于具体)Pinterest 只允许保留以下 URL 模式(按优先级):
https://www.pinterest.com/search/pins/?q=...(大搜索页 — 用户日常使用的搜索体验,海量内容 + 顶部筛选标签)https://www.pinterest.com/ideas/...(ideas 主题页 — 编辑策展,内容偏少)https://www.pinterest.com/{用户名}/...(个人画板 — 禁止)https://www.pinterest.com/pin/...(单个图钉详情 — 禁止)> 重要:Pinterest 必须优先使用大搜索 URL(/search/pins/?q=...),它是用户最熟悉的 Pinterest 搜索体验,内容更多、更新更快、支持顶部筛选标签二次精准。/ideas/ 仅作为补充。
# Dribbble 过滤
def is_valid_dribbble(url):
if "/search/" in url or "/tags/" in url:
return True
return False
# Pinterest 过滤
def is_valid_pinterest(url):
if "/search/pins" in url or "/ideas/" in url or "/search/?" in url:
return True
return False
如果搜索结果命中过多个人页面,必须调整 query 重搜,或者直接构造平台标准搜索 URL:
Dribbble 标准搜索: https://dribbble.com/search/{关键词用-连接}
Dribbble 标签页: https://dribbble.com/tags/{关键词用-连接}
Pinterest 大搜索: https://www.pinterest.com/search/pins/?q={关键词用%20连接}
Pinterest ideas: https://www.pinterest.com/ideas/{关键词用-连接}/
不再创建腾讯文档,直接生成 Markdown 文件 写入工作区,命名格式:{关键词}_{YYYYMMDD_HHMMSS}.md
# {主题} 设计灵感收集
> 收集时间:{YYYY年MM月DD日 HH:MM}
> 来源:Dribbble、Pinterest
> 总计:10 条精选搜索入口
---
## 📊 趋势概览
{AI 分析的设计趋势 5-7 条要点}
---
## 🎯 Dribbble 搜索精选 (5条)
### 1. {搜索/标签名} ⭐⭐⭐⭐⭐
- **链接**:{URL — 必须是 /search/ 或 /tags/ 类型}
- **类型**:{搜索页 / 标签页}
- **描述**:{这个搜索/标签下大概有哪些类型的作品}
...(共5条,全部为搜索页或标签页)
---
## 🎨 Pinterest 搜索精选 (5条)
### 1. {搜索/ideas 名} ⭐⭐⭐⭐⭐
- **链接**:{URL — 必须是 /search/pins 或 /ideas/ 类型}
- **类型**:{大搜索 / ideas 主题页}
- **描述**:{这个搜索下大概有哪些类型的内容}
...(共5条,全部为大搜索或 ideas 页)
---
## 🔍 推荐搜索关键词
- `{主题} ui design`
- `{主题} app ui`
- `{主题} dashboard`
- `{主题} mobile`
---
## 📌 相关方向推荐
需要我帮你搜索以下细分主题吗?
1. **{方向1}** - {简短描述}
2. **{方向2}** - {简短描述}
3. **{方向3}** - {简短描述}
| 工具 | 用途 | 安装 |
|---|---|---|
| ------ | ------ | ------ |
| Tavily API | 搜索 Dribbble 和 Pinterest | pip install tavily-python |
在环境中设置:
export TAVILY_API_KEY="tvly-你的key"
当用户说"帮我收集 XXX 的设计灵感"时:
用户: 帮我收集医疗App的设计灵感
正确执行:
site:dribbble.com healthcare app ui designdribbble.com/search/healthcare-app、dribbble.com/tags/medical-ui 等site:pinterest.com healthcare app ui designpinterest.com/search/pins/?q=healthcare+app+ui、pinterest.com/ideas/healthcare-app-design/... 等医疗App设计灵感_20260521_102200.md错误示范:
https://dribbble.com/some-user/shots(个人作品集)https://www.pinterest.com/azart108/health-apps/(个人画板)https://dribbble.com/shots/12345-design(单个作品页)当 Tavily 搜不到合适的官方搜索入口时,可以直接构造:
def build_dribbble_urls(keyword):
kw = keyword.replace(" ", "-").lower()
return [
f"https://dribbble.com/search/{kw}",
f"https://dribbble.com/tags/{kw}",
f"https://dribbble.com/search/{kw}-ui",
f"https://dribbble.com/search/{kw}-mobile",
f"https://dribbble.com/search/{kw}-app",
]
def build_pinterest_urls(keyword):
kw_q = keyword.replace(" ", "+").lower()
kw_d = keyword.replace(" ", "-").lower()
return [
f"https://www.pinterest.com/search/pins/?q={kw_q}+ui+design",
f"https://www.pinterest.com/search/pins/?q={kw_q}+app+design",
f"https://www.pinterest.com/ideas/{kw_d}-design/",
f"https://www.pinterest.com/search/pins/?q={kw_q}+mobile",
f"https://www.pinterest.com/search/pins/?q={kw_q}+inspiration",
]
| 方向 | 关键词 |
|---|---|
| ------ | -------- |
| 移动 App | mobile app, ios, android, app ui |
| 网页设计 | web design, landing page, website |
| 仪表盘 | dashboard, admin panel, data viz |
| 电商 | ecommerce, shop, checkout |
| 金融 | fintech, banking, crypto, payment |
| 健康 | health, medical, fitness, wellness |
| 风格 | glassmorphism, neumorphism, minimal |
{关键词}_{YYYYMMDD_HHMMSS}.md共 3 个版本