New advertisers: 50% off your first month with code FIRSTMONTHSee slots
aaaaqwq avatar

Web Scraping Automation

Structured guide for scraping websites and calling APIs, covering Python and JavaScript tooling, anti-bot tactics, and storage.

skills.sh installs
580
GitHub stars
121
last updated
Jul 14, 2026
View on GitHub

What it does

  • Covers the workflow from target analysis and design through script development and testing, with robots.txt and rate-limit practices
  • Includes code patterns for static pages (requests, BeautifulSoup), dynamic pages (Selenium, Playwright), and REST API calls with auth headers
  • Enforces closing browser sessions after scraping, with a forced pkill cleanup of leftover Chrome processes to prevent resource leaks
  • Designed for developers who need data extraction scripts, API integration, or scheduled collection saved to CSV, JSON, or databases

Install

$ npx -y skills add aaaaqwq/agi-super-team --skill web-scraping-automation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

网站爬取与 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:现代浏览器自动化

Details

Repository
github.com/aaaaqwq/agi-super-team
Categories
Browser Automation & Scraping, Python
First seen
May 16, 2026

More from aaaaqwq/agi-super-team

All 8

Similar to Web Scraping Automation

More Browser Automation & Scraping