wangkun 1 ano atrás
pai
commit
6bf4bc0db4
2 arquivos alterados com 2 adições e 1 exclusões
  1. 1 1
      README.MD
  2. 1 0
      xigua/xigua_recommend/xg_recommend.py

+ 1 - 1
README.MD

@@ -199,7 +199,7 @@ PyMySQL==1.0.2
 redis==4.5.1
 # pip3 install requests
 requests==2.27.1
-# pip3 install selenium
+# pip3 install selenium==4.2.0
 selenium==4.9.1
 # pip3 install urllib3
 urllib3==1.26.9

+ 1 - 0
xigua/xigua_recommend/xg_recommend.py

@@ -267,6 +267,7 @@ class XiguaRecommend:
             # 登录失效,报警
             if 20 >= datetime.datetime.now().hour >= 10:
                 Feishu.bot(log_type, crawler, "西瓜推荐,登录失效")
+            return
 
         videoList_elements = driver.find_elements(By.XPATH, '//*[@class="HorizontalFeedCard HorizontalChannelBlockList__item"]')
         if len(videoList_elements) == 0: