filesite
8 months ago
7 changed files with 258 additions and 231 deletions
@ -1,45 +1,57 @@ |
|||||||
export default { |
export default { |
||||||
//自动任务相关配置
|
//自动任务相关配置
|
||||||
task_list_dir: 'todo/', //待抓取任务文件保存目录
|
task_list_dir: 'todo/', //待抓取任务文件保存目录
|
||||||
data_save_dir: 'data/', //抓取完成数据保存目录,文件格式:.url快捷方式,详细说明见:https://filesite.io
|
data_save_dir: 'data/', //抓取完成数据保存目录,文件格式:.url快捷方式,详细说明见:https://filesite.io
|
||||||
|
|
||||||
|
|
||||||
//bot相关配置
|
//herounion对接配置
|
||||||
//userAgent: '~ chrome >= 114 && mac', //指定操作系统和浏览器版本
|
herounion: { |
||||||
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', |
name: 'machete_hero', //爬虫名字
|
||||||
viewport: { |
description: '支持Machete的TaJian皮肤的hero爬虫', //爬虫简介
|
||||||
width: 1440, |
platforms: 'douyin,kuaishou,xigua,bilibili', //爬虫支持的平台
|
||||||
height: 900 |
contracts: 'tajiantv', //爬虫支持的数据采集合约(可二次开发自定义)
|
||||||
}, |
country: 'cn', //爬虫所在国家
|
||||||
|
lang: 'zh', //爬虫支持的语言
|
||||||
viewports: { |
contact: 'https://filesite.io', //爬虫的联系方式
|
||||||
mob: { |
|
||||||
width: 375, |
|
||||||
height: 667 |
|
||||||
}, |
}, |
||||||
pc: { |
|
||||||
|
|
||||||
|
//bot相关配置
|
||||||
|
cloud_server: 'ws://192.168.3.13:1818', |
||||||
|
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', |
||||||
|
viewport: { |
||||||
width: 1440, |
width: 1440, |
||||||
height: 900 |
height: 900 |
||||||
}, |
}, |
||||||
}, |
|
||||||
|
viewports: { |
||||||
//请求参数
|
mob: { |
||||||
heroBotOptions: { |
width: 375, |
||||||
timeoutMs: 20000, |
height: 667 |
||||||
referrer: '', |
}, |
||||||
}, |
pc: { |
||||||
|
width: 1440, |
||||||
//网页tab参数
|
height: 900 |
||||||
heroTabOptions: { |
}, |
||||||
timeoutMs: 30000 |
}, |
||||||
}, |
|
||||||
|
//请求参数
|
||||||
//常用浏览器user-agent
|
heroBotOptions: { |
||||||
userAgents: { |
timeoutMs: 20000, |
||||||
iphone_chrome: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', |
referrer: '', |
||||||
iphone_wechat: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Mobile/15C202 MicroMessenger/6.6.1 NetType/4G Language/zh_CN', |
}, |
||||||
mac_chrome: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', |
|
||||||
android_wechat: 'Mozilla/5.0 (Linux; Android 7.1.1; OD103 Build/NMF26F; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN', |
//网页tab参数
|
||||||
} |
heroTabOptions: { |
||||||
|
timeoutMs: 30000 |
||||||
|
}, |
||||||
|
|
||||||
|
//常用浏览器user-agent
|
||||||
|
userAgents: { |
||||||
|
iphone_chrome: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', |
||||||
|
iphone_wechat: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Mobile/15C202 MicroMessenger/6.6.1 NetType/4G Language/zh_CN', |
||||||
|
mac_chrome: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', |
||||||
|
android_wechat: 'Mozilla/5.0 (Linux; Android 7.1.1; OD103 Build/NMF26F; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN', |
||||||
|
} |
||||||
|
|
||||||
}; |
}; |
@ -1,9 +1,13 @@ |
|||||||
{ |
{ |
||||||
"name": "machege-hero", |
"name": "machege-hero", |
||||||
"type": "module", |
"type": "module", |
||||||
"dependencies": { |
"dependencies": { |
||||||
"@ulixee/cloud": "^2.0.0-alpha.24", |
"@ulixee/cloud": "^2.0.0-alpha.24", |
||||||
"@ulixee/hero": "^2.0.0-alpha.24", |
"@ulixee/hero": "^2.0.0-alpha.24", |
||||||
"node-cron": "^3.0.2" |
"node-cron": "^3.0.2", |
||||||
} |
"axios": "^1.3.3" |
||||||
|
}, |
||||||
|
"scripts": { |
||||||
|
"start": "node spider.mjs" |
||||||
|
} |
||||||
} |
} |
Loading…
Reference in new issue