aaaaqwq avatar

Web Scraping Automation

This handles web scraping and API automation with Python or JavaScript stacks like requests, BeautifulSoup, Selenium, and Playwright. It'll parse HTML, call REST endpoints, handle dynamic pages, and even deal with anti-scraping measures like request throttling and header spoofing. The workflow is straightforward: analyze the target, pick your tools, write the scraper, test and optimize. One thing worth noting is the explicit focus on resource cleanup, especially killing Chrome processes after browser automation runs, which shows this was built with real production headaches in mind. Includes practical examples for static scraping, API calls, and dynamic content extraction.

skills.sh installs
580
GitHub stars
74
last updated
Jul 14, 2026

Install

$ npx -y skills add aaaaqwq/claude-code-skills --skill web-scraping-automation --agent claude-code

Installs into .claude/skills of the current project.

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:现代浏览器自动化

Sponsors

Details

Repository
github.com/aaaaqwq/claude-code-skills
Category
Automation & Workflows
First seen
May 16, 2026

More from aaaaqwq/claude-code-skills

All 9
1sickn33 avatardata-engineering-data-pipelinesickn33/antigravity-awesome-skillsdata engineering data pipeline572skills.sh installs
2parcadei avataragentic-workflowparcadei/continuous-claude-v3Agentic Workflow Pattern567skills.sh installs
3joeseesun avatarqiaomu-opencli-browserjoeseesun/opencli-skillqiaomu opencli browser542skills.sh installs
4levnikolaevich avatarln-100-documents-pipelinelevnikolaevich/claude-code-skillsCreates complete project documentation system (project docs, reference, tasks, tests). Use when bootstrapping docs from scratch or regenerating all.479skills.sh installs
5pedronauck avataragent-browserpedronauck/skillsAutomates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web 466skills.sh installs
6manutej avatarlangchain-orchestrationmanutej/luxor-claude-marketplaceComprehensive guide for building production-grade LLM applications using LangChain's chains, agents, memory systems, RAG patterns, and advanced orchestration452skills.sh installs