介绍ua-parser-js 是一个轻量级的 JavaScript 库,用于解析用户代理字符串,以获取有关用户的操作系统、浏览器类型、版本、设备类型等信息。GitHub文档使用npm 下载npm install ua-parser-js引入import UAParser from 'ua-parser-js'; const parser = new UAParser('[user-agent]'); // 如果不填写会自动获取当前页面上的ua const result = parser.getResult(); console.log(result);返回结果{ ua: "", browser: { name: "", version: "", major: "", type: "" }, engine: { name: "", ver
import random user_agent = [ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 OPR/26.0.1656.60", "Opera/8.0 (Windows NT 5.1; U; en)", "Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.50", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.50", "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.1
a
不过是些许风霜罢了