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 }