Commit 59dd3601 by yangchen

贴吧回答采集增加所在贴吧 为source

parent 2f99cb1b
...@@ -115,6 +115,8 @@ public class BaiduTiebaCrawlerParse extends HttpClientTemplateOK { ...@@ -115,6 +115,8 @@ public class BaiduTiebaCrawlerParse extends HttpClientTemplateOK {
if(title == null || title.length() < 1) { if(title == null || title.length() < 1) {
title = document.select("#j_core_title_wrap > h3").text(); title = document.select("#j_core_title_wrap > h3").text();
} }
String source = null;
source = document.select("div.card_top.clearfix > div.card_title > a").text();
System.out.println(title); System.out.println(title);
for(Element element : elementes) { for(Element element : elementes) {
String time = null; String time = null;
...@@ -136,7 +138,7 @@ public class BaiduTiebaCrawlerParse extends HttpClientTemplateOK { ...@@ -136,7 +138,7 @@ public class BaiduTiebaCrawlerParse extends HttpClientTemplateOK {
} }
if(time != null && time.length() > 1) { if(time != null && time.length() > 1) {
TiebaData tbd = new TiebaData("http://tieba.baidu.com/p/"+aid, title, time, tid, null, author, content, aid); TiebaData tbd = new TiebaData("http://tieba.baidu.com/p/"+aid, title, time, tid, source, author, content, aid);
System.out.println(tbd.toString()); System.out.println(tbd.toString());
list.add(tbd); list.add(tbd);
} }
......
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