Commit f97d4454 by win 10

解决冲突

parent 0e4b6f49
...@@ -25,7 +25,7 @@ public class MediaSelfSource { ...@@ -25,7 +25,7 @@ public class MediaSelfSource {
public static void main(String[] args) { public static void main(String[] args) {
ProxyFactory.init("zookeeper://192.168.0.36:2181","local",GroupType.PROVIDER); ProxyFactory.init("zookeeper://192.168.0.36:2181","local",GroupType.PROVIDER);
List<String> urlList = new ArrayList<>(); List<String> urlList = new ArrayList<>();
urlList.add("https://v.youku.com/v_show/id_XNDA5Nzg4MzA4NA==.html"); urlList.add("https://www.lanjinger.com/news/detail?id=115982");
List<MediaSelfSourceBean> u = MediaSelfSource.getMediaSelfSource(urlList); List<MediaSelfSourceBean> u = MediaSelfSource.getMediaSelfSource(urlList);
for(MediaSelfSourceBean b : u) { for(MediaSelfSourceBean b : u) {
System.out.println(b.toString()); System.out.println(b.toString());
......
...@@ -453,6 +453,30 @@ public class MatchSource { ...@@ -453,6 +453,30 @@ public class MatchSource {
if(source!=null && source.length()>1){ if(source!=null && source.length()>1){
source = "易车网-" + source; source = "易车网-" + source;
} }
}else if(url.contains("ittime.com.cn")){
//it时代网
source = document.select("div.top.author > dl > dd > p > a").text();
if(Objects.nonNull(source) && !source.isEmpty()){
source = "it时代网-" + source;
}
}else if(url.contains("guancha.cn")){
// 风闻社区
source = document.select("div.main-tow > div.box-left > div.article-content > div:nth-child(3) > div.user-main > h4 > a").text();
if(Objects.nonNull(source) && !source.isEmpty()){
source = "风闻社区-" + source;
}
}else if(url.contains("yesky.com")){
// 天极自媒体
source = document.select("div.elf > dl > dd.bt > a").text();
if(Objects.nonNull(source) && !source.isEmpty()){
source = "天极自媒体-" + source;
}
}else if(url.contains("nkj.cn")){
// 牛科技
source = document.select("div.widget.suxingme_post_author > div > div.author_name > a").text();
if(Objects.nonNull(source) && !source.isEmpty()){
source = "牛科技-" + source;
}
}else if(url.contains("chejiahao.autohome.com.cn")){ }else if(url.contains("chejiahao.autohome.com.cn")){
//汽车之家 //汽车之家
source = document.select("div.authorMes").select("[class=\"name text-overflow\"]") source = document.select("div.authorMes").select("[class=\"name text-overflow\"]")
...@@ -540,6 +564,18 @@ public class MatchSource { ...@@ -540,6 +564,18 @@ public class MatchSource {
if(source!=null && !source.equals("")){ if(source!=null && !source.equals("")){
source = "科技讯-" + source; source = "科技讯-" + source;
} }
}else if(url.contains("tmtpost.com")){
source = document.select("article > div.post-info > a")
.text();
if(source!=null && !source.equals("")){
source = "钛媒体-" + source;
}
}else if(url.contains("cyzone.cn")){
source = document.select("div.article-author-info > div.author-main > div > div.a-word > div.a-name > a")
.text();
if(source!=null && !source.equals("")){
source = "创业邦-" + source;
}
}else if(url.contains("36kr.com")){ }else if(url.contains("36kr.com")){
source = document.select("div.info-header-text > a.author-name").text(); source = document.select("div.info-header-text > a.author-name").text();
if(source!=null && !source.equals("")){ if(source!=null && !source.equals("")){
...@@ -599,10 +635,12 @@ public class MatchSource { ...@@ -599,10 +635,12 @@ public class MatchSource {
source = "蓝鲸-" + source; source = "蓝鲸-" + source;
} }
}else if (url.contains("lanjinger.com")) { }else if (url.contains("lanjinger.com")) {
source = document.select("div.article_info > span.info.author_name").text().replaceAll(".*编辑| ", ""); if(document.select("div.content_left > div:nth-child(2) > span").text().contains("专栏")) {
source = document.select("a.author_name").text().replaceAll(".*编辑| ", "");
if(source!=null && !source.equals("")) { if(source!=null && !source.equals("")) {
source = "蓝鲸财经-" + source; source = "蓝鲸财经-" + source;
} }
}
}else if (url.contains("huxiu.com")) { }else if (url.contains("huxiu.com")) {
source = document.select("div.article__author-info-box > a.article-author-info > span.author-info__username").text(); source = document.select("div.article__author-info-box > a.article-author-info > span.author-info__username").text();
if(source!=null && !source.equals("")) { if(source!=null && !source.equals("")) {
......
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