老掉牙的东西,真懒得理,不过现在有些网站,耍些小聪明,简单的利用user-agent就来判断是不是采集器。
当然是指一些简单的个人针对自己需求写的简单性的采集软件,忘记user-agent了,结果通过URL采集到的,并不是直接的内容页,而有可能是跳转到的列表页。(如果是正常访问,他会显示内容页,通过无user-agent来判断你是软件后,他就直接转到列表页,真是闲的蛋疼)
就不解释user-agent是啥了,抄点流行的UA大全贴在这,用的直接拿走。
操作系统标识 FreeBSD X11;FreeBSD(version no.)i386 X11;FreeBSD(version no.)AMD64 Linux X11;Linux ppc X11;Linux ppc64 X11;Linux i686 X11;Linux x86_64 Mac Macintosh;PPC Mac OS X Macintosh;Intel Mac OS X Solaris X11;SunOS i86pc X11;SunOs sun4u Windows Windows NT 6.1 对应windows7 Windows NT 6.0 对应windows Vista Windows NT 5.2 对应windows 2003 Windows NT 5.1 对应windows xp Windows NT 5.0 对应windows 2000 Windows ME Windows 98
基本包括所有的UA信息:
PC端: safari5.1–MAC User-Agent:Mozilla/5.0(Macintosh;U;IntelMacOSX10_6_8;en-us)AppleWebKit/534.50(KHTML,likeGecko)Version/5.1Safari/534.50 safari5.1–Windows User-Agent:Mozilla/5.0(Windows;U;WindowsNT6.1;en-us)AppleWebKit/534.50(KHTML,likeGecko)Version/5.1Safari/534.50 IE9.0 User-Agent:Mozilla/5.0(compatible;MSIE9.0;WindowsNT6.1;Trident/5.0; IE8.0 User-Agent:Mozilla/4.0(compatible;MSIE8.0;WindowsNT6.0;Trident/4.0) IE7.0 User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT6.0) IE6.0 User-Agent:Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.1) Firefox4.0.1–MAC User-Agent:Mozilla/5.0(Macintosh;IntelMacOSX10.6;rv:2.0.1)Gecko/20100101Firefox/4.0.1 Firefox4.0.1–Windows User-Agent:Mozilla/5.0(WindowsNT6.1;rv:2.0.1)Gecko/20100101Firefox/4.0.1 Opera11.11–MAC User-Agent:Opera/9.80(Macintosh;IntelMacOSX10.6.8;U;en)Presto/2.8.131Version/11.11 Opera11.11–Windows User-Agent:Opera/9.80(WindowsNT6.1;U;en)Presto/2.8.131Version/11.11 Chrome17.0–MAC User-Agent:Mozilla/5.0(Macintosh;IntelMacOSX10_7_0)AppleWebKit/535.11(KHTML,likeGecko)Chrome/17.0.963.56Safari/535.11 傲游(Maxthon) User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;Maxthon2.0) 腾讯TT User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;TencentTraveler4.0) 世界之窗(TheWorld)2.x User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1) 世界之窗(TheWorld)3.x User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;TheWorld) 搜狗浏览器1.x User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;Trident/4.0;SE2.XMetaSr1.0;SE2.XMetaSr1.0;.NETCLR2.0.50727;SE2.XMetaSr1.0) 360浏览器 User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;360SE) Avant User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1;AvantBrowser) GreenBrowser User-Agent:Mozilla/4.0(compatible;MSIE7.0;WindowsNT5.1) 移动设备端: safariiOS4.33–iPhone User-Agent:Mozilla/5.0(iPhone;U;CPUiPhoneOS4_3_3likeMacOSX;en-us)AppleWebKit/533.17.9(KHTML,likeGecko)Version/5.0.2Mobile/8J2Safari/6533.18.5 safariiOS4.33–iPodTouch User-Agent:Mozilla/5.0(iPod;U;CPUiPhoneOS4_3_3likeMacOSX;en-us)AppleWebKit/533.17.9(KHTML,likeGecko)Version/5.0.2Mobile/8J2Safari/6533.18.5 safariiOS4.33–iPad User-Agent:Mozilla/5.0(iPad;U;CPUOS4_3_3likeMacOSX;en-us)AppleWebKit/533.17.9(KHTML,likeGecko)Version/5.0.2Mobile/8J2Safari/6533.18.5 AndroidN1 User-Agent:Mozilla/5.0(Linux;U;Android2.3.7;en-us;NexusOneBuild/FRF91)AppleWebKit/533.1(KHTML,likeGecko)Version/4.0MobileSafari/533.1 AndroidQQ浏览器Forandroid User-Agent:MQQBrowser/26Mozilla/5.0(Linux;U;Android2.3.7;zh-cn;MB200Build/GRJ22;CyanogenMod-7)AppleWebKit/533.1(KHTML,likeGecko)Version/4.0MobileSafari/533.1 AndroidOperaMobile User-Agent:Opera/9.80(Android2.3.4;Linux;OperaMobi/build-1107180945;U;en-GB)Presto/2.8.149Version/11.10 AndroidPadMotoXoom User-Agent:Mozilla/5.0(Linux;U;Android3.0;en-us;XoomBuild/HRI39)AppleWebKit/534.13(KHTML,likeGecko)Version/4.0Safari/534.13 BlackBerry User-Agent:Mozilla/5.0(BlackBerry;U;BlackBerry9800;en)AppleWebKit/534.1+(KHTML,likeGecko)Version/6.0.0.337MobileSafari/534.1+ WebOSHPTouchpad User-Agent:Mozilla/5.0(hp-tablet;Linux;hpwOS/3.0.0;U;en-US)AppleWebKit/534.6(KHTML,likeGecko)wOSBrowser/233.70Safari/534.6TouchPad/1.0 NokiaN97 User-Agent:Mozilla/5.0(SymbianOS/9.4;Series60/5.0NokiaN97-1/20.0.019;Profile/MIDP-2.1Configuration/CLDC-1.1)AppleWebKit/525(KHTML,likeGecko)BrowserNG/7.1.18124 WindowsPhoneMango User-Agent:Mozilla/5.0(compatible;MSIE9.0;WindowsPhoneOS7.5;Trident/5.0;IEMobile/9.0;HTC;Titan) UC无 User-Agent:UCWEB7.0.2.37/28/999 UC标准 User-Agent:NOKIA5700/UCWEB7.0.2.37/28/999 UCOpenwave User-Agent:Openwave/UCWEB7.0.2.37/28/999 UCOpera User-Agent:Mozilla/4.0(compatible;MSIE6.0;)Opera/UCWEB7.0.2.37/28/999
最后,怎样获取自己浏览器的UA(user-agent)呢??????
1.打开任意浏览器
2. 地址栏打上:about://version 然后回车
3. 一行一行看,寻找:
大概就是这样子,只不过后面是我自己的,主要看:用户代理
用户代理
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
可以了,OVER
发表评论