@voidpkg/scrapper
社区
如果您有任何疑问或想提供帮助,请加入我们的Discord服务器。
安装
这是通过NPM注册表可用的node.js模块。安装是使用npm install命令完成的:
$ npm install @voidpkg/scrapper
用法
const { Engine } = require ( '@voidpkg/scrapper' ) ;
Engine . google ( 'Void Development' , {
proxies : [
{
host : '0.0.0.0' ,
port : 8080 ,
auth ?: {
username : 'clqu' ,
password : '123456'
}
}
]
} ) . then ( console . log ) . catch ( console . error ) ; 发动机API
/*
types: 0 = Search, 1 = Suggestions, 2 = Images
*/
Engine . google ( query , options , type ) ;
Engine . bing ( query , options , type ) ;
Engine . youtube ( query , options ) ;
Engine . wikipedia ( query , options ) ; 使用构造函数
const { Google , Bing , YouTube , Wikipedia } = require ( '@voidpkg/scrapper' ) ;
const proxies = [
{
host : '0.0.0.0' ,
port : 8080 ,
auth ?: {
username : 'clqu' ,
password : '123456'
}
}
] ;
const google = new Google ( { proxies } ) ;
const bing = new Bing ( { proxies } ) ;
const youtube = new YouTube ( { proxies } ) ;
const wikipedia = new Wikipedia ( { proxies } ) ;
// Search
google . search ( 'Void Development' ) . then ( console . log ) . catch ( console . error ) ;
bing . search ( 'Void Development' ) . then ( console . log ) . catch ( console . error ) ;
youtube . search ( 'Void Development' ) . then ( console . log ) . catch ( console . error ) ;
wikipedia . get ( 'Void Development' ) . then ( console . log ) . catch ( console . error ) ;
// Suggestions
google . suggestions ( 'Void Development' ) . then ( console . log ) . catch ( console . error ) ;
bing . suggestions ( 'Void Development' ) . then ( console . log ) . catch ( console . error ) ; 引擎
| 姓名 | 状态 |
|---|
| Google搜索 | ✅ |
| Google建议 | ✅ |
| Google图像 | |
| Bing搜索 | ✅ |
| Bing建议 | ✅ |
| Bing图像 | |
| Wikipedia搜索 | ✅ |
| YouTube视频搜索 | ✅ |
选项
谷歌
| 姓名 | 必需的 | 类型 | 默认 |
|---|
| Mkt | | 细绳 | En-us |
| 页 | | 数字 | 1 |
| 永恒 | | 数字 | 10 |
| 安全的 | | 关闭,活跃,高,中,安全定义 | 离开 |
| 标题 | | {[键:字符串]:任何; } | 不明确的 |
| 代理 | | 代理人[] | 不明确的 |
| 查询 | | {[键:字符串]:任何; } | 不明确的 |
bing
| 姓名 | 必需的 | 类型 | 默认 |
|---|
| Mkt | | 细绳 | En-us |
| 页 | | 数字 | 1 |
| 永恒 | | 数字 | 10 |
| 安全的 | | 关闭,中等,严格 | 离开 |
| 标题 | | {[键:字符串]:任何; } | 不明确的 |
| 代理 | | 代理人[] | 不明确的 |
| 查询 | | {[键:字符串]:任何; } | 不明确的 |
YouTube
| 姓名 | 必需的 | 类型 | 默认 |
|---|
| 标题 | | {[键:字符串]:任何; } | 不明确的 |
| 代理 | | 代理人[] | 不明确的 |
| 查询 | | {[键:字符串]:任何; } | 不明确的 |
维基百科
| 姓名 | 必需的 | 类型 | 默认 |
|---|
| 语言 | | 细绳 | en |
| 标题 | | {[键:字符串]:任何; } | 不明确的 |
| 代理 | | 代理人[] | 不明确的 |
| 查询 | | {[键:字符串]:任何; } | 不明确的 |
代理人
| 姓名 | 必需的 | 类型 |
|---|
| 主持人 | ✅ | 细绳 |
| 港口 | ✅ | 数字 |
| auth | | {用户名:字符串;密码:字符串; } |
如何获得免费代理?
- 网状(推荐)
- proxyscrape
- 近位主义者
- proxydb
- proxynova
执照
麻省理工学院