Scroll to the end of the infinite loading page using selenium Python
问题 I'm scraping the follower names from the twitter using Selenium and that page is infinite, whenever I scroll down I can see new followers. Somehow I want to go to the bottom of the page so that I can scrap all the followers. while number != 5: driver.execute_script("window.scrollTo(0,document.body.scrollHeight)") number = number + 1 time.sleep(5) usernames = driver.find_elements_by_class_name( "css-4rbku5.css-18t94o4.css-1dbjc4n.r-1loqt21.r-1wbh5a2.r-dnmrzs.r-1ny4l3l") for username in