Browse Source

add weixinzhishu: search_key

wangkun 2 years ago
parent
commit
c8bd0df18b
1 changed files with 2 additions and 3 deletions
  1. 2 3
      weixinzhishu/weixinzhishu_main/search_key.py

+ 2 - 3
weixinzhishu/weixinzhishu_main/search_key.py

@@ -37,10 +37,9 @@ class Searchkey:
             # Common.logger(log_type, crawler).info('点击微信指数')
             driver.find_elements(By.NAME, '消息')[-1].click()
             time.sleep(1)
-            driver.find_elements(By.NAME, '关闭')[-1].click()
-            # Common.logger(log_type, crawler).info('休眠 3 秒,退出微信')
-            time.sleep(1)
             driver.quit()
+            time.sleep(1)
+            driver.find_elements(By.NAME, '关闭')[-1].click()
         except Exception as e:
             Common.logger(log_type, crawler).error(f'start_wechat异常:{e}\n')