chromedrive新增代理支持
This commit is contained in:
parent
7ac9d1b188
commit
ec6fce9a8d
@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class QQBotApplication {
|
public class QQBotApplication {
|
||||||
public static final String version="QQBot v.1.2.22";
|
public static final String version="QQBot v.1.2.23";
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("version = " + version);
|
System.out.println("version = " + version);
|
||||||
SpringApplication.run(QQBotApplication.class, args);
|
SpringApplication.run(QQBotApplication.class, args);
|
||||||
|
@ -65,7 +65,11 @@ public class WebClient {
|
|||||||
ChromeOptions options = new ChromeOptions();
|
ChromeOptions options = new ChromeOptions();
|
||||||
// options.addArguments("--disable-gpu");
|
// options.addArguments("--disable-gpu");
|
||||||
// options.addArguments("blink-settings=imagesEnabled=false");
|
// 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) {
|
if("true".equals(headless)||WebClient.headless) {
|
||||||
options.addArguments("--headless");
|
options.addArguments("--headless");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user