mirror of
https://github.com/luxfi/pics.git
synced 2026-07-26 21:08:58 +00:00
Add useragent to webring crawling
This commit is contained in:
@@ -8,6 +8,7 @@ const fetch = require('node-fetch')
|
||||
, { outputFile } = require('fs-extra')
|
||||
, { SocksProxyAgent } = require('socks-proxy-agent')
|
||||
, uploadDirectory = require(__dirname+'/../../lib/file/uploaddirectory.js')
|
||||
, { version } = require(__dirname+'/../../package.json')
|
||||
, timeUtils = require(__dirname+'/../../lib/converter/timeutils.js');
|
||||
|
||||
module.exports = {
|
||||
@@ -32,7 +33,7 @@ module.exports = {
|
||||
timeout: 20000,
|
||||
agent,
|
||||
headers: {
|
||||
'User-Agent':''
|
||||
'User-Agent': `jschan/${version} (https://gitgud.io/fatchan/jschan/)`,
|
||||
}
|
||||
})
|
||||
.then(res => res.json())
|
||||
|
||||
Reference in New Issue
Block a user