|
@@ -21,6 +21,7 @@ import org.openqa.selenium.chrome.ChromeOptions;
|
|
import org.openqa.selenium.support.ui.ExpectedConditions;
|
|
import org.openqa.selenium.support.ui.ExpectedConditions;
|
|
import org.openqa.selenium.support.ui.WebDriverWait;
|
|
import org.openqa.selenium.support.ui.WebDriverWait;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
@@ -186,10 +187,12 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Value("${jeecg.path.chrome-driver}")
|
|
|
|
+ private String chromeDriver;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void adkuaishouWebLogin(String phone, String password) {
|
|
public void adkuaishouWebLogin(String phone, String password) {
|
|
- System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
|
|
|
|
-// System.getProperties().setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
|
|
|
|
|
|
+ System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
|
|
ChromeOptions chromeOptions = new ChromeOptions();
|
|
ChromeOptions chromeOptions = new ChromeOptions();
|
|
WebDriver webDriver = new ChromeDriver(chromeOptions);
|
|
WebDriver webDriver = new ChromeDriver(chromeOptions);
|
|
try {
|
|
try {
|
|
@@ -246,8 +249,7 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void getVideoList(String uid) {
|
|
public void getVideoList(String uid) {
|
|
-// System.getProperties().setProperty("webdriver.chrome.driver", "D:/chromedriver.exe");
|
|
|
|
- System.getProperties().setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
|
|
|
|
|
|
+ System.getProperties().setProperty("webdriver.chrome.driver", chromeDriver);
|
|
ChromeOptions chromeOptions = new ChromeOptions();
|
|
ChromeOptions chromeOptions = new ChromeOptions();
|
|
WebDriver webDriver = new ChromeDriver(chromeOptions);
|
|
WebDriver webDriver = new ChromeDriver(chromeOptions);
|
|
try {
|
|
try {
|