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
090827f1
Commit
090827f1
authored
Dec 27, 2013
by
Yihua Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #52 from d0ngw/master
The SeleniumDownloader should call the setRawText
parents
5d9fda06
a5a9b141
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
.gitignore
.gitignore
+2
-1
SeleniumDownloader.java
...raft/webmagic/downloader/selenium/SeleniumDownloader.java
+1
-0
No files found.
.gitignore
View file @
090827f1
target
/*
target
*.iml
out/
.idea
webmagic-selenium/src/main/java/us/codecraft/webmagic/downloader/selenium/SeleniumDownloader.java
View file @
090827f1
...
...
@@ -84,6 +84,7 @@ public class SeleniumDownloader implements Downloader, Closeable {
WebElement
webElement
=
webDriver
.
findElement
(
By
.
xpath
(
"/html"
));
String
content
=
webElement
.
getAttribute
(
"outerHTML"
);
Page
page
=
new
Page
();
page
.
setRawText
(
content
);
page
.
setHtml
(
new
Html
(
UrlUtils
.
fixAllRelativeHrefs
(
content
,
request
.
getUrl
())));
page
.
setUrl
(
new
PlainText
(
request
.
getUrl
()));
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