chromedrive新增代理支持
This commit is contained in:
@@ -65,7 +65,11 @@ public class WebClient {
|
||||
ChromeOptions options = new ChromeOptions();
|
||||
// options.addArguments("--disable-gpu");
|
||||
// options.addArguments("blink-settings=imagesEnabled=false");
|
||||
String headless = RedisTools.get("headless");
|
||||
String headless = RedisTools.get("chromedrive_headless");
|
||||
String proxy=RedisTools.get("chromedrive_proxy");
|
||||
if("true".equals(proxy)) {
|
||||
options.addArguments("--proxy-server=http://127.0.0.1:7890");
|
||||
}
|
||||
if("true".equals(headless)||WebClient.headless) {
|
||||
options.addArguments("--headless");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user