wangkun vor 2 Jahren
Ursprung
Commit
bfbd97c448
2 geänderte Dateien mit 6 neuen und 8 gelöschten Zeilen
  1. 2 4
      main/shipinhao_get_url.py
  2. 4 4
      main/shipinhao_topic.py

+ 2 - 4
main/shipinhao_get_url.py

@@ -118,8 +118,7 @@ class GetUrl:
     def write_url(cls, log_type):
         # try:
         while True:
-            if Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy')[1][11] is None\
-                    or Feishu.get_values_batch(log_type, 'shipinhao', '4Y2e5n')[1][11] is None:
+            if Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy')[1][11] is None:
                 Common.del_charles_files('recommend')
                 cls.click_video(log_type)
                 Common.logger(log_type).info('等待 2s')
@@ -147,8 +146,7 @@ class GetUrl:
     def run_get_url(cls, log_type):
         # try:
         while True:
-            if len(Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy')) == 1\
-                    and len(Feishu.get_values_batch(log_type, 'shipinhao', '4Y2e5n')) == 1:
+            if len(Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy')) == 1:
                 Common.logger(log_type).info('暂无需要获取地址的视频信息')
                 time.sleep(30)
                 break

+ 4 - 4
main/shipinhao_topic.py

@@ -217,7 +217,7 @@ class Topic:
                     Common.logger(log_type).info('视频已下载\n')
 
                 # feeds 表去重
-                elif str(video_title) in [x for y in Feishu.get_values_batch(log_type, 'shipinhao', '4Y2e5n') for x
+                elif str(video_title) in [x for y in Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy') for x
                                           in y]:
                     Common.logger(log_type).info('向上滑动页面')
                     driver.swipe(500, 1600, 500, 300, 200)
@@ -231,7 +231,7 @@ class Topic:
                     driver.find_element(By.ID, 'com.tencent.mm:id/guw').click()
 
                     # 把视频信息写入飞书feeds文档
-                    Feishu.insert_columns(log_type, 'shipinhao', '4Y2e5n', 'ROWS', 1, 2)
+                    Feishu.insert_columns(log_type, 'shipinhao', 'FSDlBy', 'ROWS', 1, 2)
                     get_feeds_time = int(time.time())
                     values = [[time.strftime('%Y/%m/%d %H:%M:%S', time.localtime(get_feeds_time)),
                                '话题榜',
@@ -243,11 +243,11 @@ class Topic:
                                comment_cnt,
                                str(user_name)]]
                     time.sleep(1)
-                    Feishu.update_values(log_type, 'shipinhao', '4Y2e5n', 'A2:Z2', values)
+                    Feishu.update_values(log_type, 'shipinhao', 'FSDlBy', 'A2:Z2', values)
                     Common.logger(log_type).info('视频信息写入飞书文档成功\n')
 
                     while True:
-                        if Feishu.get_values_batch(log_type, 'shipinhao', '4Y2e5n')[1][11] is None:
+                        if Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy')[1][11] is None:
                             Common.logger(log_type).info('等待更新 URL 信息')
                             time.sleep(10)
                         else: