Thanks for Ripon Al Wasim's answer. I did some improvement. because of network problems, I retry three times until break loop.
driver.get(url)
# Get scroll height
last_height = driver.execute_script("return document.body.scrollHeight")
try_times = 0
while True:
# Scroll down to bottom
driver.execute_script("window.scrollBy(0,2000)")
# Wait to load page
time.sleep(scroll_delay)
# Calculate new scroll height and compare with last scroll height
new_height = driver.execute_script("return document.body.scrollHeight")
if last_height == new_height:
try_times += 1
if try_times > 3:
try_times = 0
break
last_height = new_height