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
362fdd06
Commit
362fdd06
authored
Feb 11, 2014
by
yihua.huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:code4craft/webmagic
parents
af809c4d
7e8a5c7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
.gitignore
.gitignore
+2
-1
README.md
README.md
+4
-0
FileCacheQueueScheduler.java
...codecraft/webmagic/scheduler/FileCacheQueueScheduler.java
+1
-1
SeleniumDownloader.java
...raft/webmagic/downloader/selenium/SeleniumDownloader.java
+1
-0
No files found.
.gitignore
View file @
362fdd06
target
/*
target
*.iml
*.iml
out/
out/
.idea
.idea
README.md
View file @
362fdd06
...
@@ -127,3 +127,7 @@ To write webmagic, I refered to the projects below :
...
@@ -127,3 +127,7 @@ To write webmagic, I refered to the projects below :
### Mail-list:
### Mail-list:
[
https://groups.google.com/forum/#!forum/webmagic-java
](
https://groups.google.com/forum/#!forum/webmagic-java
)
[
https://groups.google.com/forum/#!forum/webmagic-java
](
https://groups.google.com/forum/#!forum/webmagic-java
)
[

](https://bitdeli.com/free "Bitdeli Badge")
webmagic-extension/src/main/java/us/codecraft/webmagic/scheduler/FileCacheQueueScheduler.java
View file @
362fdd06
...
@@ -126,7 +126,7 @@ public class FileCacheQueueScheduler implements Scheduler {
...
@@ -126,7 +126,7 @@ public class FileCacheQueueScheduler implements Scheduler {
private
void
readCursorFile
()
throws
IOException
{
private
void
readCursorFile
()
throws
IOException
{
BufferedReader
fileCursorReader
=
null
;
BufferedReader
fileCursorReader
=
null
;
try
{
try
{
new
BufferedReader
(
new
FileReader
(
getFileName
(
fileCursor
)));
fileCursorReader
=
new
BufferedReader
(
new
FileReader
(
getFileName
(
fileCursor
)));
String
line
;
String
line
;
//read the last number
//read the last number
while
((
line
=
fileCursorReader
.
readLine
())
!=
null
)
{
while
((
line
=
fileCursorReader
.
readLine
())
!=
null
)
{
...
...
webmagic-selenium/src/main/java/us/codecraft/webmagic/downloader/selenium/SeleniumDownloader.java
View file @
362fdd06
...
@@ -84,6 +84,7 @@ public class SeleniumDownloader implements Downloader, Closeable {
...
@@ -84,6 +84,7 @@ public class SeleniumDownloader implements Downloader, Closeable {
WebElement
webElement
=
webDriver
.
findElement
(
By
.
xpath
(
"/html"
));
WebElement
webElement
=
webDriver
.
findElement
(
By
.
xpath
(
"/html"
));
String
content
=
webElement
.
getAttribute
(
"outerHTML"
);
String
content
=
webElement
.
getAttribute
(
"outerHTML"
);
Page
page
=
new
Page
();
Page
page
=
new
Page
();
page
.
setRawText
(
content
);
page
.
setHtml
(
new
Html
(
UrlUtils
.
fixAllRelativeHrefs
(
content
,
request
.
getUrl
())));
page
.
setHtml
(
new
Html
(
UrlUtils
.
fixAllRelativeHrefs
(
content
,
request
.
getUrl
())));
page
.
setUrl
(
new
PlainText
(
request
.
getUrl
()));
page
.
setUrl
(
new
PlainText
(
request
.
getUrl
()));
page
.
setRequest
(
request
);
page
.
setRequest
(
request
);
...
...
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