Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source_forward
Overview
Overview
Details
Activity
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
zhiwei
source_forward
Commits
6ce658e0
Commit
6ce658e0
authored
Jan 06, 2018
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改来源验证问题
parent
90fc68cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/main/java/com/zhiwei/source_forward/crawler/SourceForwardPageProcessor.java
+7
-7
No files found.
src/main/java/com/zhiwei/source_forward/crawler/SourceForwardPageProcessor.java
View file @
6ce658e0
...
...
@@ -33,14 +33,14 @@ public class SourceForwardPageProcessor implements PageProcessor {
String
source
=
null
;
String
channel
=
"新闻"
;
try
{
channel
=
verifyChannel
(
page
.
getUrl
().
get
());
if
(
channel
==
null
){
if
(
page
.
getStatusCode
()!=
404
){
List
<
Node
>
nodeList
=
page
.
getHtml
().
getDocument
().
head
().
childNodes
();
source
=
TreateData
.
matchSource
(
page
.
getUrl
().
get
(),
page
.
getHtml
().
toString
(),
sourceList
);
channel
=
TreateData
.
matchChannel
(
nodeList
);
if
(
page
.
getStatusCode
()!=
404
){
channel
=
verifyChannel
(
page
.
getUrl
().
get
());
if
(
channel
==
null
){
List
<
Node
>
nodeList
=
page
.
getHtml
().
getDocument
().
head
().
childNodes
();
channel
=
TreateData
.
matchChannel
(
nodeList
);
}
source
=
TreateData
.
matchSource
(
page
.
getUrl
().
get
(),
page
.
getHtml
().
toString
(),
sourceList
);
}
}
catch
(
Exception
e
)
{
source
=
null
;
...
...
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