selenium 控制窗口无限向下滚动
使用脚本 window.scrollBy(0, 1000)
,放入 while True
循环,示例代码:
while True:
js = 'window.scrollBy(0, 1000)'
driver.execute_script(js)
使用脚本 window.scrollBy(0, 1000)
,放入 while True
循环,示例代码:
while True:
js = 'window.scrollBy(0, 1000)'
driver.execute_script(js)