Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_3 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Mobile/15A432 MicroMessenger/6.5.19 NetType/4G Language/zh_CN
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_3 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Mobile/15A432 MicroMessenger/6.5.19 NetType/WIFI Language/zh_CN
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_3 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A432 Safari/604.1
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_3 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Mobile/15A432 MicroMessenger/6.5.19 NetType/WIFI Language/zh_CN
Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Mobile Safari/537.36
Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Mobile Safari/537.36
Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1
抓取的用户访问头部信息如上,我现在想:正则匹配出 Mozilla/5.0 () 括号中的东西,匹配出 MicroMessenger、NetType/WIFI、NetType/4G 酱紫的信息,其实就是想要得到用户是通过什么浏览器访问、网络类型、手机信息
哦对了,这个是 H5 网页抓取的
1
WuwuGin 2017-10-25 18:03:35 +08:00 via Android 1
你这是赤裸裸的伸手啊,你直接匹配第一组()就行了啊,具体操作自己琢磨吧。
|
2
ragnaroks 2017-10-25 18:43:21 +08:00
javascript 有 devices.js
|