智能网页抓取工具

一款结合Bright Data移动运营商代理和Anthropic Claude AI的智能网页抓取工具,通过自然语言指令实现无需编码的网页数据采集。

  • by hcarrillo001
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 hcarrillo001/brightdata-mcp-server-agentic-ai-web-scraper-template

使用说明

brightdata mcp服务器代理ai web scraper模板

BrightData MCP服务器代理AI网络爬虫模板

  An intelligent, plug-and-play web scraper that combines Bright Data's Mobile Carrier Proxy (MCP) 
  with Anthropic’s Claude for agentic, natural language-based scraping. A lightweight        
  Tkinter GUI lets you describe what to scrape in plain English — no coding required.
  I can envison tool also reading step from QC/ALM and feed the agent the steps 

重要图书馆

库 描述
mcp 与任务控制平台的接口,用于管理参数、会话和遥测。
langchain_mcp_adapters 与LangChain兼容的MCP工具和代理。
langgraph 启用基于图形的反应式代理流。
langchain_anthropic 集成Claude语言模型。
dotenv 从 .env 文件。
asyncio 启用代理操作的异步执行。
os 用于访问环境变量。

✨ 主要特点 🌐 Bright Data MCP代理集成

 Bypass geo-restrictions, CAPTCHAs, and anti-bot defenses using mobile carrier IPs.

🧠 Claude的代理AI

 Claude interprets your natural language instructions and dynamically generates scraping behavior.

🧾 自然语言接口

 Just describe the task in plain English — the scraper figures out the rest.

💻 Tkinter图形用户界面

     A desktop interface to enter instructions, monitor scraping progress, and view logs.
  
  🔁 Retry & Adapt
     
     Uses reasoning to handle failed pages, change in structure, or blocking events.
  
  🧱 Modular & Scalable
    
    Clearly separated logic (GUI, agent, scraper, MCP) for easier maintenance and extension.

📷 演示示例

    "Go to zillow.com, search Denver, and scrape the price, address, and number of beds for the first 5 listings."
  
  ✅ Type this into the GUI.
  ✅ Claude interprets it.
  ✅ Scraper executes it using Bright Data’s mobile proxy.
  ✅ Results saved — no code touched.

🛠 需求

  Node.js (v16 or higher)

  Python 3.x
  
  Bright Data account with MCP access
  
  Claude Desktop App (Anthropic)
  
  Internet connection

⚙️ 设置 🔹 1.克劳德桌面设置

  Download and install from Anthropic

  Launch the app

  Go to Settings → Developer Settings

  🔹 2. Create anthropic accound and Bright Data account with the correct tools
        - Anthropic API Key (will require credit card) https://console.anthropic.com/settings/keys  - This key will be used in the python project as a environment variable
        - Bright data create and account and add Browser API tool and a Unlocked API tool see images below. You can name it what you would like but on step three you will need to use the name WEB_UNLOCKER_ZONE = <Web unlocker name>

        
  🔹 3. Bright Data MCP Server
  Option A – Use config.json
  json
  Copy
  Edit
  {
    "mcpServers": {
      "Bright Data": {
        "command": "npx",
        "args": ["@brightdata/mcp"],
        "env": {
          "API_TOKEN": "<BrightData API TOKEN>",
          "WEB_UNLOCKER_ZONE": "<BrightData Web Unlocker Zone>",
          "BROWSER_AUTH": "<BrightData Browser Auth>"
        }
      }
    }
  }

有关mpc设置的更多明亮数据,请访问:https://github.com/brightdata/brightdata-mcp

需要的工具

Python设置

⚙️ 设置

🔹 环境变量

你 必须创建 .env Python根目录中的文件

API_TOKEN=your_brightdata_api_token
WEB_UNLOCKER_ZONE=your_web_unlocker_zone
BROWSER_AUTH=your_browser_auth
ANTHROPIC_API_KEY=anthropic_key