|
@@ -27,6 +27,7 @@ import org.quartz.Job;
|
|
import org.quartz.JobExecutionContext;
|
|
import org.quartz.JobExecutionContext;
|
|
import org.quartz.JobExecutionException;
|
|
import org.quartz.JobExecutionException;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
import javax.imageio.ImageIO;
|
|
import java.awt.*;
|
|
import java.awt.*;
|
|
@@ -38,6 +39,8 @@ import java.util.List;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
public class OceanengineJob implements Job {
|
|
public class OceanengineJob implements Job {
|
|
|
|
+ @Value("${jeecg.path.chrome-driver}")
|
|
|
|
+ private String chromeDriver;
|
|
@Autowired
|
|
@Autowired
|
|
private IDouyinHotService douyinHotService;
|
|
private IDouyinHotService douyinHotService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -261,7 +264,7 @@ public class OceanengineJob implements Job {
|
|
|
|
|
|
private void login(String account,String password){
|
|
private void login(String account,String password){
|
|
String url = "https://cc.oceanengine.com/login";
|
|
String url = "https://cc.oceanengine.com/login";
|
|
- System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
|
|
|
|
|
|
+ System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
|
|
ChromeOptions chromeOptions = new ChromeOptions();
|
|
ChromeOptions chromeOptions = new ChromeOptions();
|
|
chromeOptions.addArguments("--headless");
|
|
chromeOptions.addArguments("--headless");
|
|
chromeOptions.addArguments("--no-sandbox");
|
|
chromeOptions.addArguments("--no-sandbox");
|