zhangyong 8 달 전
부모
커밋
5d3e591ad7
3개의 변경된 파일22개의 추가작업 그리고 20개의 파일을 삭제
  1. 1 1
      xssy_channel/cljx_nrxs.py
  2. 1 1
      xssy_channel/dy_nrxs.py
  3. 20 18
      xssy_channel/sph_nrxs.py

+ 1 - 1
xssy_channel/cljx_nrxs.py

@@ -184,7 +184,7 @@ class CLJX:
                             result,
                             "72777058",
                             "5",
-                            "通用-安全分享",
+                            "通用-分享到群",
                             "AI片尾引导",
                             "",
                             "",

+ 1 - 1
xssy_channel/dy_nrxs.py

@@ -61,7 +61,7 @@ class DYNrxs:
                             result,
                             "72804451",
                             "5",
-                            "通用-安全分享",
+                            "通用-分享到群",
                             "AI片尾引导",
                             "",
                             "",

+ 20 - 18
xssy_channel/sph_nrxs.py

@@ -135,22 +135,23 @@ class SphNrxs:
             'sec-ch-ua-mobile': '?0',
             'sec-ch-ua-platform': '"macOS"'
         }
-        response = requests.request("POST", url, headers=headers, data=payload)
-        response = response.json()
-        ret = response['ret']
-        if ret == 0:
-            try:
-                appid = response['data']['item'][0]['appid']
-                if appid:
-                    return appid
-            except Exception as e:
-                Common.logger("sph_nrxs").info(f"{user}获取腾讯互选平台appid异常,异常信息{e}")
-                return None
-
-        else:
-            Feishu.bot("xinxin", '腾讯互选平台提醒', f'腾讯互选平台cookie 失效了,请即使更换', 'xinxin')
+        for i in range(3):
+            response = requests.request("POST", url, headers=headers, data=payload)
+            response = response.json()
+            ret = response['ret']
+            if ret == 0:
+                try:
+                    appid = response['data']['item'][0]['appid']
+                    if appid:
+                        return appid
+                except Exception as e:
+                    Common.logger("sph_nrxs").info(f"{user}获取腾讯互选平台appid异常,异常信息{e}")
+                    continue
 
-        print(response.text)
+            else:
+                Feishu.bot("xinxin", '腾讯互选平台提醒', f'腾讯互选平台cookie 失效了,请即使更换', 'xinxin')
+                return None
+        return None
 
     """获取用户主页是否符合规则"""
     @classmethod
@@ -269,10 +270,10 @@ class SphNrxs:
                                             values = [
                                                 [
                                                     "视频号",
-                                                    user_name,
+                                                    nick_name,
                                                     pq_id,
                                                     "5",
-                                                    "通用-安全分享",
+                                                    "通用-分享到群",
                                                     "AI片尾引导",
                                                     "",
                                                     "",
@@ -285,6 +286,7 @@ class SphNrxs:
                                             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)
                         else:
@@ -321,4 +323,4 @@ class SphNrxs:
 
 
 if __name__ == '__main__':
-  SphNrxs.sph_nrxs_data()
+    SphNrxs.sph_nrxs_data()