Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aaaaqwq avatar

Web Scraping Automation

  • 14 installs
  • 82 repo stars
  • Updated August 2, 2026
  • aaaaqwq/agi-super-skills

web-scraping-automation is a Claude Code skill that builds web scrapers and API-calling scripts in Python or JavaScript, with anti-scraping handling and browser-process cleanup.

About

web-scraping-automation builds scripts to scrape website data and call REST or GraphQL APIs, then parse and store the results. It covers Python and JavaScript scraping stacks, anti-scraping tactics, and mandatory browser-process cleanup after each run. A developer uses it to extract product or news data, test API endpoints, or schedule recurring scrapes. Documentation is in Chinese.

  • Builds web scrapers and API-calling scripts with cleanup and anti-bot handling
  • Covers Python (requests, BeautifulSoup, Scrapy, Selenium, Playwright) and JS (cheerio, puppeteer)
  • Mandates killing Chrome/Selenium processes after each scrape to avoid resource leaks

Web Scraping Automation by the numbers

  • 14 all-time installs (skills.sh)
  • Ranked #1,419 of 2,719 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
At a glance

web-scraping-automation capabilities & compatibility

Capabilities
web scraping · api integration · data extraction · crawler
Works with
playwright · selenium
Use cases
web scraping · api development
From the docs

What web-scraping-automation says it does

**所有涉及浏览器的爬取任务完成后,必须自动关闭 Chrome/Selenium 进程!**
SKILL.md
**Scrapy**:专业爬虫框架
SKILL.md
npx skills add https://github.com/aaaaqwq/agi-super-skills --skill web-scraping-automation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs14
repo stars82
Last updatedAugust 2, 2026
Repositoryaaaaqwq/agi-super-skills

What it does

Write and run web scrapers or API-calling scripts that extract, parse and store data with anti-bot handling.

Who is it for?

Writing scrapers and API scripts to extract, parse and store web data

Skip if: Simple one-off web lookups where a plain fetch would do

When should I use this skill?

When you need to scrape a site, call and parse an API, or build a recurring crawler

By the numbers

  • 5 Python scraping libraries listed
  • 4 JavaScript scraping libraries listed

Files

SKILL.mdMarkdownGitHub ↗

网站爬取与 API 自动化

功能说明

此技能专门用于自动化网站数据爬取和 API 接口调用,包括:

  • 分析和爬取网站结构
  • 调用和测试 REST/GraphQL API
  • 创建自动化爬虫脚本
  • 数据解析和清洗
  • 处理反爬虫机制
  • 定时任务和数据存储

使用场景

  • "爬取这个网站的产品信息"
  • "帮我调用这个 API 并解析返回数据"
  • "创建一个脚本定时抓取新闻"
  • "分析这个网站的 API 接口文档"
  • "绕过这个网站的反爬虫限制"

技术栈

⚠️ 资源清理原则(强制)

所有涉及浏览器的爬取任务完成后,必须自动关闭 Chrome/Selenium 进程!

# Playwright 示例
from playwright.sync_api import sync_playwright

def scrape_website():
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=True)
        page = browser.new_page()
        # ... 爬取逻辑 ...
        browser.close()

    # ⚠️ 强制清理残留进程
    import subprocess
    subprocess.run(['pkill', '-f', 'chrome'], capture_output=True)

# Selenium 示例
from selenium import webdriver

driver = webdriver.Chrome()
try:
    # ... 爬取逻辑 ...
    pass
finally:
    driver.quit()
    # ⚠️ 确保清理
    import subprocess
    subprocess.run(['pkill', '-f', 'chrome'], capture_output=True)

原因: 避免内存泄漏和资源占用,防止 Gateway CPU 100% 过载

Python 爬虫

  • requests:HTTP 请求库
  • BeautifulSoup4:HTML 解析
  • Scrapy:专业爬虫框架
  • Selenium:浏览器自动化
  • Playwright:现代浏览器自动化

JavaScript 爬虫

  • axios:HTTP 客户端
  • cheerio:服务端 jQuery
  • puppeteer:Chrome 自动化
  • node-fetch:Fetch API

工作流程

1. 目标分析

  • 检查网站结构和数据位置
  • 分析 API 接口和认证方式
  • 评估反爬虫机制

2. 方案设计

  • 选择合适的技术栈
  • 设计数据提取策略
  • 规划错误处理和重试机制

3. 脚本开发

  • 编写爬虫代码
  • 实现数据解析逻辑
  • 添加日志和监控

4. 测试优化

  • 验证数据准确性
  • 优化性能和稳定性
  • 处理边界情况

最佳实践

  • 遵守 robots.txt 规则
  • 设置合理的请求间隔
  • 使用 User-Agent 和请求头
  • 实现错误重试机制
  • 数据去重和验证
  • 使用代理池(如需要)
  • 保存原始数据和日志

常见场景示例

1. 简单网页爬取

import requests
from bs4 import BeautifulSoup

def scrape_website(url):
    headers = {'User-Agent': 'Mozilla/5.0'}
    response = requests.get(url, headers=headers)
    soup = BeautifulSoup(response.text, 'html.parser')

    # 提取数据
    data = []
    for item in soup.select('.product'):
        data.append({
            'title': item.select_one('.title').text,
            'price': item.select_one('.price').text
        })
    return data

2. API 调用

import requests

def call_api(endpoint, params=None):
    headers = {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
    }
    response = requests.get(endpoint, headers=headers, params=params)
    return response.json()

3. 动态网页爬取

from selenium import webdriver
from selenium.webdriver.common.by import By

def scrape_dynamic_page(url):
    driver = webdriver.Chrome()
    driver.get(url)

    # 等待页面加载
    driver.implicitly_wait(10)

    # 提取数据
    elements = driver.find_elements(By.CLASS_NAME, 'item')
    data = [elem.text for elem in elements]

    driver.quit()
    return data

反爬虫应对策略

  • 请求头伪装:模拟真实浏览器
  • 代理轮换:使用代理池
  • 验证码处理:OCR 或第三方服务
  • Cookie 管理:维护会话状态
  • 请求频率控制:避免触发限制
  • JavaScript 渲染:使用 Selenium/Playwright

数据存储方案

  • CSV/Excel:简单数据导出
  • JSON:结构化数据存储
  • 数据库:MySQL、PostgreSQL、MongoDB
  • 云存储:S3、OSS
  • 数据仓库:用于大规模数据分析

Related skills

FAQ

Which scraping tools does it use?

Python (requests, BeautifulSoup, Scrapy, Selenium, Playwright) and JavaScript (axios, cheerio, puppeteer).

Does it handle anti-scraping?

Yes, it covers header spoofing, proxy rotation, cookie management and request-rate control.

Automation & Workflowsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.