from time import sleep
from selenium import webdriver
driver = webdriver.Chrome()
# 华为市场的url
huawei_url = "https://appgallery1.huawei.com/#/Apps"
driver.get(huawei_url)
sleep(2)
# 一共下滑十次,下滑一次停顿0.5s
for i in range(10):
driver.execute_script(‘window.scrollTo(0,document.body.scrollHeight)‘)
sleep(0.5)