package com.thesys.spider.util.http.bean;
import java.util.Random;
/**
* 环境库
* 该Bean仅配置偶尔变动的
* @author Erciyns
*/
public class VbBean {
/**
* 是否自动转发
* 例如:HTTP : 301
*/
public static final boolean ISREDIRECT = false;
/**
* 默认50000/ms
* 用于大form读取传输。
* 多用于文件、图片读取等
*/
public static final String DEFAULT_CHARSET = "UTF-8";
/**
* 等待:默认1000/ms
*/
public static final long SLEEP_FIXEDTIME = 3000;
/**
* 默认35000/ms
* 用于小form读取传输。
*/
public static final int MIN_TIMEOUT = 55000;
/**
* 默认50000/ms
* 用于大form读取传输。
* 多用于文件、图片读取等
*/
public static final int MAX_TIMEOUT = 60000;
/**
* FireFox
* 1
*/
public static final String USERAGENT_PC_FIREFOX = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0";
/**
* Microsoft Edge
* 1
*/
public static final String USERAGENT_PC_EDGE = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063";
/**
* Internet Explorer
* 1
*/
public static final String USERAGENT_PC_IE = "Mozilla/5.0 (Wnidows NT 10.0; WOW64; Trident/7.0; vr:11.0) like Gecko";
/**
* UC浏览器
* 1
*/
public static final String USERAGENT_PC_UC = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 UBrowser/6.2.3637.802 Safari/537.36";
/***
* 搜狗高速浏览器
* 1
*/
public static final String USERAGENT_PC_SOGO = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.221 Safari/537.36 SE 2.X MetaSr 1.0";
/***
* 360安全浏览器
* 1
*/
public static final String USERAGENT_PC_360 = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36";
/**
* Google Chrome
* 1
*/
public static final String USERAGENT_PC_CHROME = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36";
/**
* QQ浏览器
* 1
*/
public static final String USERAGENT_PC_QQ = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.3538.400 QQBrowser/9.6.12501.400";
/**
* Linux
*
*/
public static final String USERAGENT_LINUX_UBTU = "curl/"+Int(10)+"."+Int(10)+"9."+Int(10);
/**
* 傲游(Maxthon)
*
*/
public static final String USERAGENT_PC_MAXTHON = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)";
/**
* 腾讯TT
*
*/
public static final String USERAGENT_PC_TT = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)";
/**
* 世界之窗(The World) 2.x/ Green Browser
*
*/
public static final String USERAGENT_PC_THEWORLD2 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)";
/**
* 世界之窗(The World) 3.x
*
*/
public static final String USERAGENT_PC_THEWORLD3 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)";
/**
* Avant
*
*/
public static final String USERAGENT_PC_AVANT = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)";
/**
* safari iOS 4.33 – iPhone
*
*/
public static final String USERAGENT_IPHONE_IOS4_33 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)";
/**
*
*/
public static final String USERAGENT_PC_BLACKBERRY = "Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+";
/**
*
*/
public static final String USERAGENT_PC_WEBOSHPTOUCHPAD = "Mozilla/6.0 (hp-tablet; Linux; OS/2.0.0; U; en-US) AppleWebKit/536.1 (KHTML, like Gecko) wOSBrowser/243.70 Safari/525.1 TouchPad/2.0";
/**
*
*/
public static final String USERAGENT_PC_NOKIA = "Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124";
/**
* NOKIA
*/
public static final String TEST = "Mozlial/5·0 (Wnidosw TN 10·"+Int(10)+"; Wni46; x64; vr:56·0) Goekc/zoloolo1 Feifoxr/65·0";
private static int Int(int num){
if(num <= 0){
num =1;
}
return new Random().nextInt(num);
}
}
java爬虫环境库
最新推荐文章于 2023-02-17 09:02:38 发布