wangkun 2 lat temu
rodzic
commit
25fb185726
1 zmienionych plików z 3 dodań i 25 usunięć
  1. 3 25
      shipinhao/shipinhao_follow.py

+ 3 - 25
shipinhao/shipinhao_follow.py

@@ -140,7 +140,7 @@ class Follow:
         driver.switch_to.context('NATIVE_APP')
 
         # 判断置顶视频
-        top_videos = driver.find_elements(By.ID, 'com.tencent.mm:id/e5s')
+        top_videos = driver.find_elements(By.ID, 'com.tencent.mm:id/i56')
         Common.logger(log_type).info(f'发现 {len(top_videos)} 个置顶视频\n')
         if len(top_videos) == 0:
             Common.logger(log_type).info('当前用户没有置顶视频')
@@ -151,7 +151,7 @@ class Follow:
                 driver.press_keycode(AndroidKey.BACK)
 
         # 判断非置顶视频
-        not_top_videos = driver.find_elements(By.ID, 'com.tencent.mm:id/nmz')
+        not_top_videos = driver.find_elements(By.ID, 'com.tencent.mm:id/e5s')
         Common.logger(log_type).info(f'发现 {len(not_top_videos)} 个非置顶视频')
         not_top_first_video = not_top_videos[len(top_videos)]
         not_top_first_video.click()
@@ -280,29 +280,7 @@ class Follow:
 
     @classmethod
     def share_to_windows(cls, log_type, driver: WebDriver, video_dict, env):
-        # video_dict = cls.get_video_info(log_type, driver)
-        # if int(video_dict['duration']) < 50:
-        #     Common.logger(log_type).info(f'时长:{int(video_dict["duration"])} < 50 秒\n')
-        # elif video_dict['video_title'] == '':
-        #     Common.logger(log_type).info('视频标题为空\n')
-        # # 过滤词库(视频标题)
-        # elif any(word if word in video_dict['video_title'] else False for word in cls.filter_words(log_type)) is True:
-        #     Common.logger(log_type).info(f'视频已中过滤词:{video_dict["video_title"]}\n')
-        # # 视频号推荐_已下载表
-        # elif video_dict['video_title'] in [x for y in Feishu.get_values_batch(log_type, 'shipinhao', 'c77cf9') for x in y]:
-        #     Common.logger(log_type).info('视频已下载\n')
-        # # 视频号定向_已下载表
-        # elif video_dict['video_title'] in [x for y in Feishu.get_values_batch(log_type, 'shipinhao', 'XxmRlE') for x in y]:
-        #     Common.logger(log_type).info('视频已下载\n')
-        # # feeds 表去重
-        # elif video_dict['video_title'] in [x for y in Feishu.get_values_batch(log_type, 'shipinhao', 'FSDlBy') for x in y]:
-        #     Common.logger(log_type).info('视频已存在\n')
-        # # feeds 表去重
-        # elif video_dict['video_title'] in [x for y in Feishu.get_values_batch(log_type, 'shipinhao', 'qzDljJ') for x in y]:
-        #     Common.logger(log_type).info('视频已存在\n')
-        # # 分享给 windows 爬虫机
-        # else:
-
+        Common.logger(log_type).info('分享给 windows 爬虫机器')
         video_dict['share_id'].click()
         driver.find_element(By.XPATH, '//*[@text="转发给朋友"]').click()
         driver.find_element(By.XPATH, '//*[@text="爬虫群"]').click()