userAgent
userAgent
辅助工具扩展了 Web Request API,提供额外的属性和方法来与请求中的用户代理对象交互。
isBot
布尔值,表示请求是否来自已知爬虫。
browser
包含请求中浏览器信息的对象。
name
: 表示浏览器名称的字符串,若无法识别则为undefined
version
: 表示浏览器版本的字符串,若无法识别则为undefined
device
包含请求中设备信息的对象。
model
: 表示设备型号的字符串,若无法识别则为undefined
type
: 表示设备类型的字符串,可能值包括:console
、mobile
、tablet
、smarttv
、wearable
、embedded
或undefined
vendor
: 表示设备厂商的字符串,若无法识别则为undefined
engine
包含浏览器引擎信息的对象。
name
: 表示引擎名称的字符串。可能值包括:Amaya
、Blink
、EdgeHTML
、Flow
、Gecko
、Goanna
、iCab
、KHTML
、Links
、Lynx
、NetFront
、NetSurf
、Presto
、Tasman
、Trident
、w3m
、WebKit
或undefined
version
: 表示引擎版本的字符串,若无法识别则为undefined
os
包含操作系统信息的对象。
name
: 表示操作系统名称的字符串,若无法识别则为undefined
version
: 表示操作系统版本的字符串,若无法识别则为undefined
cpu
包含 CPU 架构信息的对象。
architecture
: 表示 CPU 架构的字符串。可能值包括:68k
、amd64
、arm
、arm64
、armhf
、avr
、ia32
、ia64
、irix
、irix64
、mips
、mips64
、pa-risc
、ppc
、sparc
、sparc64
或undefined