wangkun 1 year ago
parent
commit
9c488330ce
1 changed files with 3 additions and 3 deletions
  1. 3 3
      xigua/xigua_search/xigua_search_scheduling0628.py

+ 3 - 3
xigua/xigua_search/xigua_search_scheduling0628.py

@@ -574,7 +574,7 @@ class XiguasearchScheduling:
         Common.logging(log_type, crawler, env, "关闭登录弹框")
         if driver.find_elements(By.XPATH, '//*[@class="xg-notification-close"]') != 0:
             driver.find_element(By.XPATH, '//*[@class="xg-notification-close"]').click()
-        # driver.get_screenshot_as_file(f"./{crawler}/photos/{user_dict['link']}-关闭登录弹框.png")
+        driver.get_screenshot_as_file(f"./{crawler}/photos/{user_dict['link']}-关闭登录弹框.png")
         Common.logger(log_type, crawler).info("展开筛选按钮")
         Common.logging(log_type, crawler, env, "展开筛选按钮")
         driver.find_element(By.XPATH, '//*[@class="searchPageV2__header-icons-categories"]').click()
@@ -582,7 +582,7 @@ class XiguasearchScheduling:
         Common.logging(log_type, crawler, env, "点击最新排序")
         driver.find_element(By.XPATH, '//*[@class="searchPageV2__header-categories-wrapper"]/*[1]/*[2]/*[1]').click()
         time.sleep(1)
-        # driver.get_screenshot_as_file(f"./{crawler}/photos/{user_dict['link']}-最新排序.png")
+        driver.get_screenshot_as_file(f"./{crawler}/photos/{user_dict['link']}-最新排序.png")
         Common.logger(log_type, crawler).info("收起筛选按钮\n")
         Common.logging(log_type, crawler, env, "收起筛选按钮\n")
         driver.find_element(By.XPATH, '//*[@class="searchPageV2__header-icons-categories"]').click()
@@ -616,7 +616,7 @@ class XiguasearchScheduling:
                     Common.logging(log_type, crawler, env, f'拖动"视频"列表第{num}个至屏幕中间')
                     driver.execute_script("arguments[0].scrollIntoView({block:'center',inline:'center'})", video_element)
                     time.sleep(1)
-                    # driver.get_screenshot_as_file(f"./{crawler}/photos/{user_dict['link']}-{num}.png")
+                    driver.get_screenshot_as_file(f"./{crawler}/photos/{user_dict['link']}-{num}.png")
                     title = video_element.find_elements(By.XPATH, '//*[@class="HorizontalFeedCard__coverWrapper disableZoomAnimation"]')[index+i-1].get_attribute('title')
                     publish_day = video_element.find_elements(By.XPATH, '//*[@class="HorizontalFeedCard-accessories-bottomInfo__statistics"]')[index+i-1].text.split('· ')[-1]
                     Common.logger(log_type, crawler).info(f"标题:{title}")