A news collector that utilizes the OpenAI Agents SDK to automatically collect news from many sources and save them to the local file system.
- Collect news from many sources like Zhihu, Weibo, etc.
- Save news to the local file system.
- Clone the repository:
git clone https://github.com/jeremy-feng/openai-agents-news-collector.git
cd openai-agents-news-collector
- Install dependencies:
uv sync
- Set up environment variables:
Create a .env
file in the project root with the following environment variables:
OPENAI_API_BASE=XX
OPENAI_API_KEY=XX
MODEL_NAME=XX
Run the main script:
uv run main.py
The agent will automatically create a new zhihu_news.txt
file in the news
directory containing the latest news from Zhihu.
You can also get the news from other sources. See the mcp_newsnow for more available sources.
This project is licensed under the MIT License - see the LICENSE file for details.