📦 Panscrapling Web Scraper — 强力网页抓取
v1.0.0基于 Scrapling 引擎开发的强大网页抓取技能,支持自动绕过 Cloudflare 及各类反爬虫防护机制,适用于采集受保护的网页内容、动态渲染页面及大规模数据提取。
0· 0·0 当前·0 累计
by @dashiming
运行时依赖
无特殊依赖
安装命令
点击复制官方npx clawhub@latest install panscrapling-web-scraper
镜像加速npx clawhub@latest install panscrapling-web-scraper --registry https://cn.longxiaskill.com
技能文档
name: Panscrapling Web Scraper description: 强大的网页抓取技能,基于 Scrapling,自动绕过 Cloudflare/反爬系统 trigger: - 抓取网页 - 爬取 - scrape - fetch - 抓取内容 - 提取网页 - 获取页面
功能概述
Panscrapling Web Scraper 是一款功能强大的网页抓取工具,基于 Scrapling 引擎开发,能够自动绕过 Cloudflare 等反爬虫防护机制,帮助用户轻松获取目标网页的内容。
核心特性
- 反爬绕过: 自动检测并绕过 Cloudflare、Turnstile 等防护机制
- 动态渲染: 支持 JavaScript 渲染页面的抓取
- 智能重试: 失败请求自动重试,提高抓取成功率
- 灵活配置: 支持自定义请求头、代理、Cookie 等
使用场景
- 抓取被 Cloudflare 保护的网页
- 提取页面内容
- 网页数据采集
- 动态渲染页面抓取
快速开始
# 安装依赖
npm install panscrapling
const { Scraper } = require('panscrapling');async function scrape() { const scraper = new Scraper(); const result = await scraper.fetch('https://example.com'); console.log(result.html); }
scrape();
配置选项
| 选项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| timeout | number | 30000 | 请求超时时间(毫秒) |
| retries | number | 3 | 重试次数 |
| proxy | string | - | 代理服务器地址 |
| userAgent | string | - | 自定义 User-Agent |
注意事项
- 请确保抓取行为符合目标网站的服务条款
- 合理设置请求频率,避免对服务器造成压力
- 遵守相关法律法规和网站 robots.txt 协议