Commit eba74706 by yangchen

添加连线家 自媒体号查询

parent 196e523d
...@@ -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("http://dy.163.com/v2/article/detail/EANTKV6H0512ES8F.html"); urlList.add("https://36kr.com/coop/retail/post/5197093.html");
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());
......
...@@ -72,7 +72,7 @@ public class URLLive { ...@@ -72,7 +72,7 @@ public class URLLive {
// 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("http://sh.qihoo.com/mob/transcoding?sign=360_e39369d1&n=10&pg=41&u=84c80ad777cd9a41152b4fd9c44f96e2&gzh=3093075895&news_sdk_version=&sqid=&_=1545026725607&callback=jsonp75&url=http%3A%2F%2Fzm.news.so.com%2F708e22872ce43ca08eec2a1fc57c6897&check=e0fae47326e7916f&ucheck=75e961d9583cfebe81a39e2dd972b0aa&uid=84c80ad777cd9a41152b4fd9c44f96e2&360newsdetail=1&c=detail&apiflag=detail&articlety=zmt"); // urlList.add("https://www.toutiao.com/a6680674354260345355");
// //
// //
// List<UrlLiveBean> u = URLLive.verificationURLLive(urlList); // List<UrlLiveBean> u = URLLive.verificationURLLive(urlList);
......
...@@ -159,7 +159,7 @@ public class MatchSource { ...@@ -159,7 +159,7 @@ public class MatchSource {
source = "东方看点-" + source; source = "东方看点-" + source;
} }
}else if(url.contains("sh.qihoo.com")){ }else if(url.contains("sh.qihoo.com") || url.contains("360kuai.com")){
//今日报点解析 //今日报点解析
source = document.select("span.source").text().trim(); source = document.select("span.source").text().trim();
if(source.length() < 2) { if(source.length() < 2) {
...@@ -278,10 +278,27 @@ public class MatchSource { ...@@ -278,10 +278,27 @@ public class MatchSource {
if(source!=null && !source.equals("")){ if(source!=null && !source.equals("")){
source = "科技讯-" + source; source = "科技讯-" + source;
} }
}else if(url.contains("36kr.com")){
source = document.select("div.info-header-text > a.author-name").text();
if(source!=null && !source.equals("")){
return "36氪-" + source;
}
source = document.select("h4.author-name").text();
if(source!=null && !source.equals("")){
return "36氪-" + source;
}
source = document.select("span.author-nickname").text();
if(source!=null && !source.equals("")){
return "36氪-" + source;
}
}else if(url.contains("lianxianjia.com")){
source = document.select("span.author-name").text();
if(source!=null && !source.equals("")){
source = "连线家-" + source;
}
} }
return source; return source;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
return null; return 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