ehlxr пре 1 година
родитељ
комит
dba71eb8e4

+ 1 - 0
etl-core/src/main/java/com/tzld/crawler/etl/util/FileUtils.java

@@ -105,6 +105,7 @@ public class FileUtils {
             // 创建代理服务的地址和端口
             // 创建代理服务的地址和端口
             Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyUrl, port));
             Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyUrl, port));
             Authenticator authenticator = new Authenticator() {
             Authenticator authenticator = new Authenticator() {
+                @Override
                 public PasswordAuthentication getPasswordAuthentication() {
                 public PasswordAuthentication getPasswordAuthentication() {
                     return (new PasswordAuthentication(username, password.toCharArray()));
                     return (new PasswordAuthentication(username, password.toCharArray()));
                 }
                 }

+ 3 - 3
etl-server/src/test/java/com/tzld/crawler/etl/EtlServerApplicationTests.java

@@ -42,15 +42,15 @@ class EtlServerApplicationTests {
     @Test
     @Test
     void produceMsgTest() {
     void produceMsgTest() {
         MQClient mqClient = new MQClient(httpEndpoint, accessKey, secretKey);
         MQClient mqClient = new MQClient(httpEndpoint, accessKey, secretKey);
-        MQProducer producer = mqClient.getProducer(instanceId, "topic_crawler_etl_dev");
+        MQProducer producer = mqClient.getProducer(instanceId, "topic_crawler_etl_test");
         ArrayList<String> platforms = Lists.newArrayList("benshanzhufu", "kuaishou", "douyin", "xigua", "gongzhonghao", "xiaoniangao");
         ArrayList<String> platforms = Lists.newArrayList("benshanzhufu", "kuaishou", "douyin", "xigua", "gongzhonghao", "xiaoniangao");
 
 
         IntStream.range(0, 20).forEach(x -> {
         IntStream.range(0, 20).forEach(x -> {
             try {
             try {
                 String s = "{\"user_id\": 6281907,\"out_user_id\": \"53322270\",\"platform\": \"" + platforms.get(x % 6) + "\",\"strategy\": \"author\"," +
                 String s = "{\"user_id\": 6281907,\"out_user_id\": \"53322270\",\"platform\": \"" + platforms.get(x % 6) + "\",\"strategy\": \"author\"," +
                         "\"out_video_id\": \"" + System.currentTimeMillis() + "\"," +
                         "\"out_video_id\": \"" + System.currentTimeMillis() + "\"," +
-                        "\"video_title\": \"" + x + "人最佳喧,睡眠时间⚡\",\"cover_url\": \"https://cdn-xphoto2.xiaoniangao.cn/5071472172@690w_385h_0e_1pr%7C690x385-5rc_0r.jpg?OSSAccessKeyId=LTAI4G2W1FsgwzAWYpPoB3v6&Expires=1688140805&Signature=BC%2F9U%2BTjPGVwaqTpStSO1kdYhQU%3D\"," +
-                        "\"video_url\": \"https://cdn-xalbum2.xiaoniangao.cn/64858d720000014567e794c9?Expires=1704038400&OSSAccessKeyId=LTAI5tB7cRkYiqHcTdkVprwb&Signature=j0WjPwp6wq1XnstwpXL6z7f9wRM%3D\"" +
+                        "\"video_title\": \"" + x + "世界上最强百米对决\",\"cover_url\": \"https://cdn-xphoto2.xiaoniangao.cn/5200474225?Expires=1704038400&OSSAccessKeyId=LTAI4G2W1FsgwzAWYpPoB3v6&Signature=ncvtSP8FSrwuU8unZMtxdXIuWBE%3D&x-oss-process=image%2Fresize%2Cw_690%2Ch_385%2Climit_0%2Finterlace%2C1%2Fformat%2Cjpg%2Fauto-orient%2C0\"," +
+                        "\"video_url\": \"https://cdn-xalbum2.xiaoniangao.cn/6506ec4500000104bd7c0623?Expires=1704038400&OSSAccessKeyId=LTAI5tB7cRkYiqHcTdkVprwb&Signature=CxJEEcwUR87is9X3li5xP5ZiDvQ%3D\"" +
                         ",\"duration\": 40,\"publish_time\": \"2023-06-08 23:01:47\",\"play_cnt\": 602,\"like_cnt\": 0,\"share_cnt\": 0,\"collection_cnt\": 0,\"comment_cnt\": 0,\"crawler_rule\": {\"period\": { \"max\": 3, \"min\": 3 },\"duration\": { \"max\": 999999999999999, \"min\": 40 },\"play_cnt\": { \"max\": 999999999999999, \"min\": 500 }},\"width\": 450,\"height\": 254}";
                         ",\"duration\": 40,\"publish_time\": \"2023-06-08 23:01:47\",\"play_cnt\": 602,\"like_cnt\": 0,\"share_cnt\": 0,\"collection_cnt\": 0,\"comment_cnt\": 0,\"crawler_rule\": {\"period\": { \"max\": 3, \"min\": 3 },\"duration\": { \"max\": 999999999999999, \"min\": 40 },\"play_cnt\": { \"max\": 999999999999999, \"min\": 500 }},\"width\": 450,\"height\": 254}";
 
 
                 TopicMessage pubMsg = new TopicMessage(s.getBytes());
                 TopicMessage pubMsg = new TopicMessage(s.getBytes());