Commit 49b9c1ed by yangchen

微信 增加分享链接是否删除判断修改

parent b0aa3851
...@@ -180,7 +180,7 @@ public class UrlLiveCrawler { ...@@ -180,7 +180,7 @@ public class UrlLiveCrawler {
try { try {
Document doc = Jsoup.parse(result); Document doc = Jsoup.parse(result);
String title = null; String title = null;
if(url.contains("mp.weixin.qq.com") || url.contains("post.mp.qq.com")){ if(url.contains("mp.weixin.qq.com") || url.contains("post.mp.qq.com") || url.contains("weixin.sogou.com")){
title = doc.select("h2.rich_media_title").text().replaceAll(" ", ""); title = doc.select("h2.rich_media_title").text().replaceAll(" ", "");
if(Objects.isNull(title) || title.isEmpty()) { if(Objects.isNull(title) || title.isEmpty()) {
title = doc.select("p.title").text(); title = doc.select("p.title").text();
......
...@@ -75,7 +75,7 @@ public class URLLive { ...@@ -75,7 +75,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("https://www.zhihu.com/question/340524333"); urlList.add("http://weixin.sogou.com/api/share?timestamp=1569677503&signature=qIbwY*nI6KU9tBso4VCd8lYSesxOYgLcHX5tlbqlMR8N6flDHs4LLcFgRw7FjTAOm-VL1HR*9bkHkS0mWu-ZWc0ngS8ZsOYF7bq3mJCtAXbdMD8klA3ZAVBmYq2GVTJu2*fqwGdiiXgkPsBKht7mUN0o-rO8uYoVU6yfvrHHg29Hj1YBH4TG2Jtkz-zMRkQYKDOXTQgexDeAYfmgWMyar1GxXsDGbOjibPJZpqlwY-A=");
List<UrlLiveBean> u = URLLive.verificationURLLive(urlList); List<UrlLiveBean> u = URLLive.verificationURLLive(urlList);
for(UrlLiveBean b : u) { for(UrlLiveBean b : u) {
......
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