Commit 8877f8ec by zhiwei

分享链接消失并失效,解析改为有验证码的链接

parent 7db2a9e8
......@@ -93,7 +93,7 @@ public class WechatAritcleSearch {
for (Element element : elements) {
try {
title = element.select("div.txt-box").select("h3").text();
link = element.select("div.txt-box").select("h3 >a").attr("href");
link = "https://weixin.sogou.com" + element.select("div.txt-box").select("h3 >a").attr("href");
// link = getRealLink(link, searchUrl);
......@@ -211,7 +211,7 @@ public class WechatAritcleSearch {
for (Element element : elements) {
try {
title = element.select("div.txt-box").select("h3").text();
link = element.select("div.txt-box").select("h3 >a").attr("href");
link = link = "https://weixin.sogou.com" + element.select("div.txt-box").select("h3 >a").attr("href");
// link = getRealLink(link, searchUrl);
content = "";
if (element.select("p.txt-info").isEmpty()) {
......@@ -379,7 +379,7 @@ public class WechatAritcleSearch {
for (Element element : elements) {
try {
title = element.select("div.txt-box").select("h3").text();
link = element.select("div.txt-box").select("h3 >a").attr("href");
link = "https://weixin.sogou.com" + element.select("div.txt-box").select("h3 >a").attr("href");
// link = getRealLink(link, searchUrl);
content = "";
if (element.select("p.txt-info").isEmpty()) {
......@@ -439,7 +439,7 @@ public class WechatAritcleSearch {
* @throws IOException
*/
public static String getRealLink(String originalUrl,String searchUrl) throws Exception{
originalUrl = "https://weixin.sogou.com" + originalUrl;
originalUrl = originalUrl;
int b = (int) (Math.floor(100 * Math.random()) + 1);
int a = originalUrl.indexOf("url=");
......
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