This commit is contained in:
Leo
2024-01-16 15:46:35 +08:00
parent 7f206d1a8f
commit 2fd73c9fd1
4 changed files with 0 additions and 134 deletions

View File

@@ -1,59 +0,0 @@
//package cn.van333.wxsend.business;
//
///**
// * @author Leo
// * @version 1.0
// * @create 2023/11/22 0022 下午 01:49
// * @description
// */
///**
// * https://www.hxm5.com/t/2065908 线报抓取
// *
// * @param url
// * @return Quartet<String, String, List < String>,List<String>> 标题 内容 图片 超链接
// */
//public static Quartet<String, String, List<String>, List<String>> getShoppingTipInfo(String url) {
// String title = null;
// StringBuilder content = new StringBuilder();
// ArrayList<String> imageUrl = Lists.newArrayList();
// ArrayList<String> hrefUrl = Lists.newArrayList();
// try {
// URI host = URLUtil.getHost(new URL(url));
// Document jsoupDocument = getJsoupDocument(HttpUtil.get(url));
// Element elementById = jsoupDocument.body().getElementById("topic-desc");
// title = elementById.children().select("h1").text();
// // content in <p> element
// Elements elementsContents = elementById.children().select("p");
// for (Element elementsContent : elementsContents) {
// for (Node pChild : elementsContent.childNodes()) {
// if (pChild instanceof TextNode) {
// content.append(((TextNode) pChild).text());
// Node preNode = pChild.previousSibling();
// if (!(preNode instanceof TextNode)) {
// content.append(StringUtils.LF);
// }
// }
// if (pChild instanceof Element) {
// if (((Element) pChild).is("a")) { // a href url
// String href = host + pChild.attr("href");
// Request.Builder request = getRequestBuilder(href);
// request.removeHeader("Host");
// String resultJSJson = getOkHttp().newCall(request.build()).execute().request().url().toString();// Direct url
// content.append(resultJSJson);
// hrefUrl.add(href);
// content.append(StringUtils.LF);
// }
// if (((Element) pChild).is("img")) { // image url
// String imageHref = pChild.attr("data-original");
// content.append(imageHref);
// imageUrl.add(imageHref);
// content.append(StringUtils.LF);
// }
// }
// }
// }
// } catch (Exception e) {
// log.error(e.getMessage());
// }
// return Quartet.with(title, content.toString(), imageUrl, hrefUrl);
// }

View File

@@ -1,21 +0,0 @@
package cn.van333.wxsend.util.xcx;
import lombok.Data;
@Data
public class Msg {
private String id;
private String type;
private String tid;
private String hot;
private String title;
private String picname;
private String content;
private String count;
private String dizhi;
private String price;
private String addtime;
private String status;
private String hackpID;
private Object buygoods;
}

View File

@@ -1,7 +0,0 @@
package cn.van333.wxsend.util.xcx;
@lombok.Data
public class respoenseModel {
private String code;
private Msg msg;
}

View File

@@ -1,47 +0,0 @@
//package cn.van333.wxsend.util.xcx;
//
//import java.io.BufferedReader;
//import java.io.InputStreamReader;
//import java.net.HttpURLConnection;
//import java.net.URL;
//
///**
// * @author Leo
// * @version 1.0
// * @create 2023/12/15 0015 下午 04:43
// * @description
// */
//public class t {
//
// public static void main(String[] args) {
//
// for (int i = 0; i < 1000; i++) {
// try {
// // 创建URL对象
// URL url = new URL("https://game.weixin.qq.com/cgi-bin/actnew/portal?uin=MTE3ODkzMzAxNQ%3D%3D&ActID=187061&actid=187061&NoticeID=0&appid=wx692970c60bffaaa1&SourceScene=59&URL=https%3A%2F%2Fgame.weixin.qq.com%2Fcgi-bin%2Factnew%2Fnewportalact%2F187061%2FMsrjb-Bjt7iuHgi1I-F--A%2Fmain_page%3Fact_id%3D187061%26k%3DMsrjb-Bjt7iuHgi1I-F--A%26pid%3Dmain_page%26abt%3D64%26source_id%3D999999%26rpt_allpath%3D999999%26wechat_pkgid%3Dnewportalact__187061_main_page%26from_wechat_pkgid%3Dpurecenter_home%26abtest_cookie%3DAAACAA%253D%253D%26wx_header%3D1%26from_id%3D3%26share_id%3DjkBc2fIlSTSVJMrlw1rpPw%26noticeid%3D0%26origin_share_id%3DjkBc2fIlSTSVJMrlw1rpPw%23noticeid%3D0&NetworkType=1&PID=0&allpath=999999_act187061&externinfo=%7B%22abt%22%3A64%7D&op=fme&jdtoken=&gpsdk_version=20231215&noticeid=0&ver=3&eventid=3&key=38896adda73a82b7a50350756f661bbf4204f6d27454d5408b1747ad8e8251cf492a12fa5d0f7882d49a6cccb35b5f8734d503144392c838343a3412520359acaccf6d36089620e243868dd3a8582725ecaa6d82fdfecd559dc9ec5d3f267cb2d2c3597fb7a222c0d9f298f7ddba6ca3fa0af50f9e3cec1b3d0ac2d1f56312cb&pass_ticket=VYgsJM6Qu9eod%2F4oc1vAMnY3hV31ZQHJ1tukfztPz6m8vYeTIif5dBxVb5Xlh%2B81RDPEcrixlamwXRMUvMM6cA%3D%3D&pskey=Msrjb-Bjt7iuHgi1I-F--A&rolesel=1");
//
// // 打开连接
// HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// connection.setRequestMethod("GET");
//
// // 发送请求并获取响应
// int responseCode = connection.getResponseCode();
// BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
// String line;
// StringBuilder response = new StringBuilder();
// while ((line = reader.readLine()) != null) {
// response.append(line);
// }
// reader.close();
//
// // 输出响应结果
// System.out.println("Response Code: " + responseCode);
// System.out.println("Response Body: " + response.toString());
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// }
//
//
//}