Commit 6ce658e0 by zhiwei

修改来源验证问题

parent 90fc68cf
...@@ -33,14 +33,14 @@ public class SourceForwardPageProcessor implements PageProcessor { ...@@ -33,14 +33,14 @@ public class SourceForwardPageProcessor implements PageProcessor {
String source = null; String source = null;
String channel = "新闻"; String channel = "新闻";
try { try {
if(page.getStatusCode()!=404){
channel = verifyChannel(page.getUrl().get()); channel = verifyChannel(page.getUrl().get());
if(channel==null){ if(channel==null){
if(page.getStatusCode()!=404){
List<Node> nodeList = page.getHtml().getDocument().head().childNodes(); List<Node> nodeList = page.getHtml().getDocument().head().childNodes();
source = TreateData.matchSource(page.getUrl().get(),page.getHtml().toString(), sourceList);
channel = TreateData.matchChannel(nodeList); channel = TreateData.matchChannel(nodeList);
} }
source = TreateData.matchSource(page.getUrl().get(),page.getHtml().toString(), sourceList);
} }
} catch (Exception e) { } catch (Exception e) {
source = null; source = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment