zhangyong 8 months ago
parent
commit
d5fee0dc76
1 changed files with 34 additions and 31 deletions
  1. 34 31
      xssy_channel/sph_nrxs.py

+ 34 - 31
xssy_channel/sph_nrxs.py

@@ -229,6 +229,7 @@ class SphNrxs:
     @classmethod
     def get_nrxs_list(cls, uid):
         cookie = Material.get_cookie_data("KsoMsyP2ghleM9tzBfmcEEXBnXg", "U1gySe", "视频号加热")
+        time.sleep(10)
         url = "http://8.217.190.241:8888/crawler/wei_xin/shi_pin_hao/jia_re"
 
         payload = json.dumps({
@@ -260,39 +261,41 @@ class SphNrxs:
                                 continue
                         user = cls.get_sph_data(user_name, uid)
                         if user:
-                            time.sleep(180)
-                            appid = cls.get_hxpt_appid(user)
-                            if appid:
-                                time.sleep(180)
-                                has_used = cls.get_hx(appid)
-                                if has_used:
-                                    if has_used == '0':
-                                        sqlCollect.insert_xssy_sph_info(uid, nick_name, user_name, has_used, appid, pq_id)
-                                        values = [
-                                            [
-                                                "视频号",
-                                                nick_name,
-                                                pq_id,
-                                                "5",
-                                                "通用-分享到群",
-                                                "AI片尾引导",
-                                                "",
-                                                "",
-                                                "AI标题",
-                                                "",
-                                                f"溯源账号:{uid}"
-                                            ]
-                                        ]
-                                        Feishu.insert_columns("WGIYsSDdxhItBwtJ0xgc0yE7nEg", '0701bd', "ROWS", 1, 2)
-                                        time.sleep(0.5)
-                                        Feishu.update_values("WGIYsSDdxhItBwtJ0xgc0yE7nEg", '0701bd', "B2:Z2",
-                                                             values)
-                                        Feishu.bot("xinxin", '视频号溯源成功提示', f'原账号:{uid},溯源到的账号:{nick_name},写入账号:{pq_id}', 'xinxin')
-                                    else:
-                                        sqlCollect.insert_xssy_sph_info(uid, nick_name, user_name, has_used, appid)
+                            # time.sleep(180)
+                            # appid = cls.get_hxpt_appid(user)
+                            # if appid:
+                            #     time.sleep(180)
+                            #     has_used = cls.get_hx(appid)
+                            #     if has_used:
+                            #         if has_used == '0':
+                            sqlCollect.insert_xssy_sph_info(uid, nick_name, user_name, "0", "", pq_id)
+                            values = [
+                                [
+                                    "视频号",
+                                    nick_name,
+                                    pq_id,
+                                    "5",
+                                    "通用-分享到群",
+                                    "AI片尾引导",
+                                    "",
+                                    "",
+                                    "AI标题",
+                                    "",
+                                    f"溯源账号:{uid}"
+                                ]
+                            ]
+                            Feishu.insert_columns("WGIYsSDdxhItBwtJ0xgc0yE7nEg", '0701bd', "ROWS", 1, 2)
+                            time.sleep(0.5)
+                            Feishu.update_values("WGIYsSDdxhItBwtJ0xgc0yE7nEg", '0701bd', "B2:Z2",
+                                                 values)
+                            Feishu.bot("xinxin", '视频号溯源成功提示', f'原账号:{uid},溯源到的账号:{nick_name},写入账号:{pq_id}', 'xinxin')
                         else:
+                            # sqlCollect.insert_xssy_sph_info(uid, nick_name, user_name, has_used, appid)
                             sqlCollect.insert_xssy_sph_info(uid, nick_name, user_name, "1")
-                            continue
+
+                        # else:
+                        #     sqlCollect.insert_xssy_sph_info(uid, nick_name, user_name, "1")
+                        #     continue
 
 
                 else: