Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webmagic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
webmagic
Commits
6f611a1f
Commit
6f611a1f
authored
Jan 24, 2018
by
shenjunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix commons-io的版本
parent
2d676f1b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
16 additions
and
21 deletions
+16
-21
pom.xml
pom.xml
+1
-1
pom.xml
webmagic-core/pom.xml
+1
-1
pom.xml
webmagic-extension/pom.xml
+1
-1
SpiderMonitor.java
...ain/java/us/codecraft/webmagic/monitor/SpiderMonitor.java
+0
-4
pom.xml
webmagic-samples/pom.xml
+1
-1
pom.xml
webmagic-saxon/pom.xml
+1
-1
Xpath2Selector.java
...n/java/us/codecraft/webmagic/selector/Xpath2Selector.java
+3
-4
pom.xml
webmagic-scripts/pom.xml
+1
-1
pom.xml
webmagic-selenium/pom.xml
+1
-1
SeleniumDownloader.java
...raft/webmagic/downloader/selenium/SeleniumDownloader.java
+3
-2
WebDriverPool.java
...codecraft/webmagic/downloader/selenium/WebDriverPool.java
+3
-4
No files found.
pom.xml
View file @
6f611a1f
...
...
@@ -6,7 +6,7 @@
<version>
7
</version>
</parent>
<groupId>
us.codecraft.duiba
</groupId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
pom
</packaging>
<properties>
...
...
webmagic-core/pom.xml
View file @
6f611a1f
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
us.codecraft.duiba
</groupId>
<artifactId>
webmagic-parent
</artifactId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
webmagic-extension/pom.xml
View file @
6f611a1f
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
us.codecraft.duiba
</groupId>
<artifactId>
webmagic-parent
</artifactId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
webmagic-extension/src/main/java/us/codecraft/webmagic/monitor/SpiderMonitor.java
View file @
6f611a1f
package
us
.
codecraft
.
webmagic
.
monitor
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
us.codecraft.webmagic.Request
;
import
us.codecraft.webmagic.Spider
;
import
us.codecraft.webmagic.SpiderListener
;
...
...
@@ -27,8 +25,6 @@ public class SpiderMonitor {
private
AtomicBoolean
started
=
new
AtomicBoolean
(
false
);
private
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
private
MBeanServer
mbeanServer
;
private
String
jmxServerName
;
...
...
webmagic-samples/pom.xml
View file @
6f611a1f
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
us.codecraft.duiba
</groupId>
<artifactId>
webmagic-parent
</artifactId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
webmagic-saxon/pom.xml
View file @
6f611a1f
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
us.codecraft.duiba
</groupId>
<artifactId>
webmagic-parent
</artifactId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
webmagic-saxon/src/main/java/us/codecraft/webmagic/selector/Xpath2Selector.java
View file @
6f611a1f
...
...
@@ -2,7 +2,6 @@ package us.codecraft.webmagic.selector;
import
net.sf.saxon.lib.NamespaceConstant
;
import
net.sf.saxon.xpath.XPathEvaluator
;
import
org.apache.log4j.Logger
;
import
org.htmlcleaner.CleanerProperties
;
import
org.htmlcleaner.DomSerializer
;
import
org.htmlcleaner.HtmlCleaner
;
...
...
@@ -40,7 +39,7 @@ public class Xpath2Selector implements Selector {
private
XPathExpression
xPathExpression
;
private
Logger
logger
=
Logger
.
getLogger
(
getClass
());
// private Logger logger = LoggerFactory
.getLogger(getClass());
public
Xpath2Selector
(
String
xpathStr
)
{
this
.
xpathStr
=
xpathStr
;
...
...
@@ -134,7 +133,7 @@ public class Xpath2Selector implements Selector {
}
return
result
.
toString
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"select text error! "
+
xpathStr
,
e
);
//
logger.error("select text error! " + xpathStr, e);
}
return
null
;
}
...
...
@@ -171,7 +170,7 @@ public class Xpath2Selector implements Selector {
results
.
add
(
result
.
toString
());
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"select text error! "
+
xpathStr
,
e
);
//
logger.error("select text error! " + xpathStr, e);
}
return
results
;
}
...
...
webmagic-scripts/pom.xml
View file @
6f611a1f
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
us.codecraft.duiba
</groupId>
<artifactId>
webmagic-parent
</artifactId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
webmagic-selenium/pom.xml
View file @
6f611a1f
...
...
@@ -3,7 +3,7 @@
<parent>
<groupId>
us.codecraft.duiba
</groupId>
<artifactId>
webmagic-parent
</artifactId>
<version>
0.7.
5
-SNAPSHOT
</version>
<version>
0.7.
6
-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
webmagic-selenium/src/main/java/us/codecraft/webmagic/downloader/selenium/SeleniumDownloader.java
View file @
6f611a1f
package
us
.
codecraft
.
webmagic
.
downloader
.
selenium
;
import
org.apache.log4j.Logger
;
import
org.openqa.selenium.By
;
import
org.openqa.selenium.Cookie
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.WebElement
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
us.codecraft.webmagic.Page
;
import
us.codecraft.webmagic.Request
;
import
us.codecraft.webmagic.Site
;
...
...
@@ -25,7 +26,7 @@ public class SeleniumDownloader implements Downloader, Closeable {
private
volatile
WebDriverPool
webDriverPool
;
private
Logger
logger
=
Logger
.
getLogger
(
getClass
());
private
Logger
logger
=
Logger
Factory
.
getLogger
(
getClass
());
private
int
sleepTime
=
0
;
...
...
webmagic-selenium/src/main/java/us/codecraft/webmagic/downloader/selenium/WebDriverPool.java
View file @
6f611a1f
package
us
.
codecraft
.
webmagic
.
downloader
.
selenium
;
import
io.github.bonigarcia.wdm.*
;
import
org.apache.log4j.Logger
;
import
org.openqa.selenium.Capabilities
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.chrome.ChromeDriver
;
import
org.openqa.selenium.edge.EdgeDriver
;
...
...
@@ -10,7 +8,8 @@ import org.openqa.selenium.firefox.FirefoxDriver;
import
org.openqa.selenium.ie.InternetExplorerDriver
;
import
org.openqa.selenium.opera.OperaDriver
;
import
org.openqa.selenium.phantomjs.PhantomJSDriver
;
import
org.openqa.selenium.remote.DesiredCapabilities
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.IOException
;
import
java.util.ArrayList
;
...
...
@@ -24,7 +23,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* web Driver连接池
*/
public
class
WebDriverPool
{
private
Logger
logger
=
Logger
.
getLogger
(
getClass
());
private
Logger
logger
=
Logger
Factory
.
getLogger
(
getClass
());
private
final
static
int
DEFAULT_CAPACITY
=
5
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment