npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cartoon-catch

v2.1.7

Published

cartoon-catch

Downloads

14

Readme

漫画爬虫

可以爬虫90%的漫画网站,不支持可以提供网址给作者,作者更新代码。

如不懂使用,可查看例子

实例

// import grab from 'cartoon-catch'; // ts
const {default: grab} = require('cartoon-catch') // js
const options = {
	name: '../漫画名‘,
	host: 'http://xx.com',
	target: '.list a'
}

grab('http://xx.com/m12345', options, function(html, url, title){
	const img = html.match(/https:\/\/img.xxx.com.*\d+.jpg/g)
	const title = html.match(/\<strong\>(.*.)\<\/strong\>/);
	return [imgs, title]
})

options 参数

|参数名|值|是否必填|类型|备注| |:----|:----|:----|:----|:----| | name | ../鬼灭之刃 | 是 | string | 指定下载路径 | | target | .list a | 是 | string | 跳转到详情的dom | | host | http://xxx.com | 否 | string | 设置详情页host, 默认使用页面host | | slice | [0, 2] | 否 | array | 指定数组返回选定的元素 | | imageHost | http://cdn.xxx.com | 否 | string | 图片地址的host,如无就无需传 | | encoding | true | 否 | boolean | 请求返回值乱码时传false | | headers | {} | 否 | object | 自定义头部 | | urlReplace | ['1.htm', '{index}'] | 否 | array | url替换 | | titleReplace | ['鬼灭之刃', '鬼灭'] | 否 | array | title替换 | | beforeFunction | function([url, title]){} | 否 | function | 自定义爬取方式 | | downloadOptions | {} | 否 | object | 设置下载图片参数 |

downloadOptions 参数

|参数名|值|是否必填|类型|备注| |:----|:----|:----|:----|:----| | extract | jpg | 否 | string | 下载图片后缀,默认jpg | | parallel | 5 | 否 | number | 并行下载,默认5 | | timeout | 5000 | 否 | number | 请求超时时间,默认5000 | | gainInterval | 3000 | 否 | number | 重试时间,默认3000 | | againTimes | 0 | 否 | number | 重试次数,默认无限次 |

其他

  • 如果需要DEBUG,环境变量传入DEBUG=debug
  • 支持爬虫网站如下

|网址| |:---| |https://www.manhuaren.com| |http://mangabz.com| |https://www.soman.com| |https://m.kuaikanmanhua.com| |https://www.77mh.cc| |http://m.pufei.org| |http://m.ikkdm.com| |https://www.kanbl.cc| |https://m.36mh.com/| |https://m.kuaikanmanhua.com/| |http://www.qiman6.com| |...|