feedgrab-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefeedgrab Setup Guide
feedgrab 安装指南
Install feedgrab, configure API keys, login to platforms, and verify everything works.
安装feedgrab、配置API密钥、登录各平台并验证所有功能正常运行。
Trigger
触发条件
/feedgrab-setup- "Install feedgrab"
- "配置 feedgrab"
- When reports "feedgrab not found"
/feedgrab
/feedgrab-setup- "Install feedgrab"
- "配置 feedgrab"
- 当调用返回"feedgrab not found"时
/feedgrab
Step 1: Check Python Environment
步骤1:检查Python环境
bash
python3 --version 2>/dev/null || python --version 2>/dev/null
pip3 --version 2>/dev/null || pip --version 2>/dev/nullRequires Python ≥ 3.10. If not available, tell user to install Python first.
bash
python3 --version 2>/dev/null || python --version 2>/dev/null
pip3 --version 2>/dev/null || pip --version 2>/dev/null要求Python版本≥3.10。如果未满足,请告知用户先安装Python。
Step 2: Install feedgrab
步骤2:安装feedgrab
bash
pip install feedgrab[all]This installs the full package with all optional dependencies (browser, stealth, Twitter, WeChat, Xiaohongshu, Feishu, Telegram).
For a minimal install:
bash
pip install feedgrab # Core only (Jina fallback)
pip install feedgrab[browser] # + Playwright
pip install feedgrab[twitter] # + Twitter GraphQL
pip install feedgrab[stealth] # + Anti-detection (patchright, curl_cffi)After installation, verify:
bash
feedgrab --helpbash
pip install feedgrab[all]该命令会安装包含所有可选依赖(浏览器、反检测、Twitter、微信、小红书、飞书、Telegram)的完整包。
最小化安装选项:
bash
pip install feedgrab # 仅核心功能(Jina兜底)
pip install feedgrab[browser] # + Playwright支持
pip install feedgrab[twitter] # + Twitter GraphQL支持
pip install feedgrab[stealth] # + 反检测能力(patchright, curl_cffi)安装完成后执行验证命令:
bash
feedgrab --helpStep 3: Interactive Setup
步骤3:交互式配置
bash
feedgrab setupThis runs a 5-step interactive wizard:
- Output directory — where to save fetched content (default: )
./output/ - Jina API — free, no key needed
- YouTube API Key — optional, for YouTube search
- GitHub Token — optional, for higher rate limits
- Creates file with your configuration
.env
bash
feedgrab setup该命令会启动5步交互式配置向导:
- 输出目录 — 抓取内容的保存位置(默认:)
./output/ - Jina API — 免费,无需密钥
- YouTube API Key — 可选,用于YouTube搜索功能
- GitHub Token — 可选,用于提升接口请求速率上限
- 自动生成文件存储你的配置信息
.env
Step 4: Platform Login (as needed)
步骤4:平台登录(按需执行)
For platforms requiring cookies/session:
bash
undefined对于需要Cookie/会话验证的平台,执行对应命令:
bash
undefinedTwitter/X — opens browser for login
Twitter/X — 打开浏览器完成登录
feedgrab login twitter
feedgrab login twitter
Xiaohongshu — opens browser for login
小红书 — 打开浏览器完成登录
feedgrab login xhs
feedgrab login xhs
WeChat MP backend — opens browser for login (session valid ~4 days)
微信公众号后台 — 打开浏览器完成登录(会话有效期约4天)
feedgrab login wechat
feedgrab login wechat
Feishu — opens browser for login
飞书 — 打开浏览器完成登录
feedgrab login feishu
**Tip**: If you have Chrome running with remote debugging enabled, set `CHROME_CDP_LOGIN=true` in `.env` to extract cookies from your existing browser session without re-login.feedgrab login feishu
**提示**:如果你已开启启用远程调试的Chrome浏览器,可在`.env`中设置`CHROME_CDP_LOGIN=true`,直接从现有浏览器会话提取Cookie,无需重新登录。Step 5: Verify Installation
步骤5:验证安装
bash
undefinedbash
undefinedFull diagnostic
全量诊断
feedgrab doctor
feedgrab doctor
Platform-specific diagnostic
特定平台诊断
feedgrab doctor x # Twitter/X
feedgrab doctor xhs # Xiaohongshu
feedgrab doctor mpweixin # WeChat
feedgrab doctor feishu # Feishu
undefinedfeedgrab doctor x # Twitter/X
feedgrab doctor xhs # 小红书
feedgrab doctor mpweixin # 微信
feedgrab doctor feishu # 飞书
undefinedStep 6: Test
步骤6:功能测试
bash
undefinedbash
undefinedTest with a simple URL (no login needed)
使用简单URL测试(无需登录)
If the output `.md` file is generated successfully, setup is complete!
如果成功生成输出`.md`文件,说明配置完成!Advanced Configuration (.env)
高级配置(.env)
Key environment variables (all optional):
env
undefined核心环境变量(均为可选):
env
undefinedOutput
输出配置
OUTPUT_DIR=./output
OUTPUT_DIR=./output
Twitter配置
X_BOOKMARKS_ENABLED=true
X_USER_TWEETS_ENABLED=true
X_LIST_TWEETS_ENABLED=true
X_DOWNLOAD_MEDIA=true
X_BOOKMARKS_ENABLED=true
X_USER_TWEETS_ENABLED=true
X_LIST_TWEETS_ENABLED=true
X_DOWNLOAD_MEDIA=true
Xiaohongshu
小红书配置
XHS_USER_NOTES_ENABLED=true
XHS_SEARCH_ENABLED=true
XHS_DOWNLOAD_MEDIA=true
XHS_FETCH_COMMENTS=true
XHS_USER_NOTES_ENABLED=true
XHS_SEARCH_ENABLED=true
XHS_DOWNLOAD_MEDIA=true
XHS_FETCH_COMMENTS=true
微信配置
MPWEIXIN_DOWNLOAD_MEDIA=true
MPWEIXIN_FETCH_COMMENTS=true
MPWEIXIN_DOWNLOAD_MEDIA=true
MPWEIXIN_FETCH_COMMENTS=true
YouTube
YouTube配置
YOUTUBE_API_KEY=your_key_here
YOUTUBE_API_KEY=your_key_here
GitHub
GitHub配置
GITHUB_TOKEN=your_token_here
GITHUB_TOKEN=your_token_here
Feishu
飞书配置
FEISHU_APP_ID=your_app_id
FEISHU_APP_SECRET=your_secret
FEISHU_DOWNLOAD_IMAGES=true
FEISHU_APP_ID=your_app_id
FEISHU_APP_SECRET=your_secret
FEISHU_DOWNLOAD_IMAGES=true
Stealth
反检测配置
CHROME_CDP_LOGIN=true
CHROME_CDP_PORT=9222
See `.env.example` in the feedgrab repo for the full list.CHROME_CDP_LOGIN=true
CHROME_CDP_PORT=9222
完整配置列表可参考feedgrab仓库中的`.env.example`文件。Troubleshooting
故障排查
| Issue | Solution |
|---|---|
| Try |
| Playwright not working | Run |
| patchright not working | Run |
| Cookie expired | Re-run |
| Windows encoding errors | feedgrab auto-fixes UTF-8, but ensure Python ≥ 3.10 |
| 问题 | 解决方案 |
|---|---|
| 尝试执行 |
| Playwright无法正常工作 | 执行 |
| patchright无法正常工作 | 执行 |
| Cookie过期 | 重新执行 |
| Windows编码错误 | feedgrab会自动修复UTF-8问题,请确保Python版本≥3.10 |