|
@@ -145,7 +145,7 @@ class Follow:
|
|
|
|
|
|
# 判断置顶视频
|
|
|
top_videos = driver.find_elements(By.ID, 'com.tencent.mm:id/i56')
|
|
|
- Common.logger(log_type).info(f'发现置顶视频{len(top_videos)}个\n')
|
|
|
+ Common.logger(log_type).info(f'发现 {len(top_videos)} 个置顶视频\n')
|
|
|
if len(top_videos) == 0:
|
|
|
Common.logger(log_type).info('当前用户没有置顶视频')
|
|
|
else:
|
|
@@ -155,7 +155,9 @@ class Follow:
|
|
|
driver.press_keycode(AndroidKey.BACK)
|
|
|
|
|
|
# 判断非置顶视频
|
|
|
- not_top_first_video = driver.find_elements(By.ID, 'com.tencent.mm:id/nmz')[len(top_videos)]
|
|
|
+ not_top_videos = driver.find_elements(By.ID, 'com.tencent.mm:id/nmz')
|
|
|
+ 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()
|
|
|
while True:
|
|
|
cls.download_publish(log_type, driver, env)
|
|
@@ -412,13 +414,13 @@ class Follow:
|
|
|
|
|
|
@classmethod
|
|
|
def search_to_all_user_homepage(cls, log_type, env):
|
|
|
- try:
|
|
|
- user_list = cls.get_users_from_feishu(log_type)
|
|
|
- for user in user_list:
|
|
|
- cls.start_follow_wechat(log_type, user, env)
|
|
|
- Common.logger(log_type).info('所有用户已抓取完毕\n')
|
|
|
- except Exception as e:
|
|
|
- Common.logger(log_type).error(f'search_to_all_user_homepage异常:{e}\n')
|
|
|
+ # try:
|
|
|
+ user_list = cls.get_users_from_feishu(log_type)
|
|
|
+ for user in user_list:
|
|
|
+ cls.start_follow_wechat(log_type, user, env)
|
|
|
+ Common.logger(log_type).info('所有用户已抓取完毕\n')
|
|
|
+ # except Exception as e:
|
|
|
+ # Common.logger(log_type).error(f'search_to_all_user_homepage异常:{e}\n')
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|