Commit 72c685be6df5c7e1a70970b0b3a3bc8c198712be

Authored by qdlgxiemaosheng
1 parent ab0c014a

science网站爬取

src/main/java/com/canrd/webmagic/config/SeleniumConfig.java
@@ -67,7 +67,7 @@ public class SeleniumConfig { @@ -67,7 +67,7 @@ public class SeleniumConfig {
67 System.setProperty("webdriver.chrome.driver", "D:\\chrome\\chromedriver-win64\\chromedriver-win64\\chromedriver.exe"); 67 System.setProperty("webdriver.chrome.driver", "D:\\chrome\\chromedriver-win64\\chromedriver-win64\\chromedriver.exe");
68 } else { 68 } else {
69 // linux 69 // linux
70 - options.setBinary("/home/canrd/webmagic/chrome/chrome-headless-shell-linux64/chrome-headless-shell"); 70 + options.setBinary("/home/canrd/webmagic/chrome/chrome-linux64/chrome");
71 System.setProperty("webdriver.chrome.driver", "/home/canrd/webmagic/chrome/chromedriver-linux64/chromedriver"); 71 System.setProperty("webdriver.chrome.driver", "/home/canrd/webmagic/chrome/chromedriver-linux64/chromedriver");
72 } 72 }
73 73
src/main/resources/application-test.yml
@@ -59,11 +59,11 @@ spring: @@ -59,11 +59,11 @@ spring:
59 testOnReturn: true 59 testOnReturn: true
60 password: 123456 60 password: 123456
61 time-between-eviction-runs-millis: 1000 61 time-between-eviction-runs-millis: 1000
62 - url: jdbc:mysql://39.108.227.113:3307/order-erp?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&allowMultiQueries=true&useAffectedRows=true&autoReconnectForPools=true 62 + url: jdbc:mysql://localhost:3306/webmagic?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useSSL=false&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&allowMultiQueries=true&useAffectedRows=true&autoReconnectForPools=true
63 username: root 63 username: root
64 redis: 64 redis:
65 database: 0 65 database: 0
66 - host: 39.108.227.113 66 + host: localhost
67 lettuce: 67 lettuce:
68 pool: 68 pool:
69 max-active: 2000 69 max-active: 2000