一个智能内容工具,从Google抓取数据,使用Bright Data MCP提取实时网络数据,并利用AI生成基于实时研究的文章。
<img src="https://img.shields.io/badge/python-3.8+-blue" /> <img src="https://img.shields.io/badge/Node.js-18+-success" /> <img src="https://img.shields.io/badge/License-MIT-blue" />
<img src="https://gips3.baidu.com/it/u=937212926,2458063543&fm=3081&app=3081&f=GIF?w=800&h=423" /> </div>克隆仓库
git clone <repository-url>
cd article-generator
安装Python依赖项
pip install -r requirements.txt
安装Node.js MCP工具
npx @brightdata/mcp
设置环境变量
在项目根目录创建一个.env文件:
OPENAI_API_KEY=your_openai_api_key_here
BRIGHT_DATA_API_TOKEN=your_bright_data_api_token_here
WEB_UNLOCKER_ZONE=your_web_unlocker_zone_here
BROWSER_ZONE=your_browser_zone_here
启动应用程序
streamlit run article_generator.py
打开浏览器
应用程序将在http://localhost:8501自动打开
生成内容
OPENAI_API_KEY:用于内容生成的OpenAI API密钥BRIGHT_DATA_API_TOKEN:用于网络抓取的Bright Data API令牌WEB_UNLOCKER_ZONE:Bright Data网页解锁区(默认:mcp_unlocker)BROWSER_ZONE:Bright Data浏览器区(默认:scraping_browser1).env文件中正确设置本项目仅供教育和研究用途。 </中文翻译>