1.1.1 • Published 1 year ago

koa-bot v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

koa-bot

介绍

检查访问是否为真人,屏蔽爬虫

软件架构

koa

安装教程

yarn add koa-bot
npm install koa-bot

使用说明

const KoaBot = require('koa-bot');
//设置黑名单IP文件目录,.txt文件行一条
KoaBot.blacklistIPPath=pbipPath;
//设置屏蔽ua文件目录,一行一条
KoaBot.blacklistUAPath=pbuaPath;
//只允许US的用户访问
KoaBot.countryCodes.push("US")
//是否为爬虫
KoaBot.isBot(ip,ua)
//koajs直接引入
app.use(KoaBot.koaInstall({
    //开发时测试的IP,发布时必须删除
    devip:"129.24.17.70",
    //是爬虫的回调
    errback:function
}))
1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago