boxjs添加京东极速版UA设置,新的闪购盲盒。
This commit is contained in:
16
JS_USER_AGENTS.js
Normal file
16
JS_USER_AGENTS.js
Normal file
@ -0,0 +1,16 @@
|
||||
const USER_AGENTS = [
|
||||
'jdltapp;iPad;3.1.0;14.4;network/wifi;Mozilla/5.0 (iPad; CPU OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1',
|
||||
]
|
||||
/**
|
||||
* 生成随机数字
|
||||
* @param {number} min 最小值(包含)
|
||||
* @param {number} max 最大值(不包含)
|
||||
*/
|
||||
function randomNumber(min = 0, max = 100) {
|
||||
return Math.min(Math.floor(min + Math.random() * (max - min)), max);
|
||||
}
|
||||
const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)];
|
||||
|
||||
module.exports = {
|
||||
USER_AGENT
|
||||
}
|
Reference in New Issue
Block a user