from selenium import webdriver
import time
url = 'https://www.baidu.com/'
driver = webdriver.Chrome()
driver.get(url)
#等待5秒
driver.implicitly_wait(5)
#浏览器最大化
driver.maximize_window()
time.sleep(1)
#刷新网页
driver.refresh()
#下拉到底,循环6次,刷新
for i in range(6):
time.sleep(2)
#下拉到底
driver.execute_script("document.documentElement.scrollTop=10000")
# 等待1秒
time.sleep(2)
time.sleep(1)
#退出浏览器
driver.quit()