![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
cartoon-catch
Advanced tools
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]
})
参数名 | 值 | 是否必填 | 类型 | 备注 |
---|---|---|---|---|
name | ../鬼灭之刃 | 是 | string | 指定下载路径 |
target | .list a | 是 | string | 跳转到详情的dom |
host | http://xxx.com | 否 | string | 设置详情页host, 默认使用页面host |
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 | 设置下载图片参数 |
参数名 | 值 | 是否必填 | 类型 | 备注 |
---|---|---|---|---|
extract | jpg | 否 | string | 下载图片后缀,默认jpg |
parallel | 5 | 否 | number | 并行下载,默认5 |
timeout | 5000 | 否 | number | 请求超时时间,默认5000 |
gainInterval | 3000 | 否 | number | 重试时间,默认3000 |
againTimes | 0 | 否 | number | 重试次数,默认无限次 |
FAQs
cartoon-catch
The npm package cartoon-catch receives a total of 0 weekly downloads. As such, cartoon-catch popularity was classified as not popular.
We found that cartoon-catch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.