I started this question off in a previous post: Web scraping with Selenium not capturing full text
If you look at the bottom of that page, I need to write a while loop that scrolls to the bottom of each page and grabs the full text.
This is what I have so far:
while True:
for i in tqdm(chat_links):
driver.get(i)
driver.execute_script("window.scrollTo(0,document.body.scrollHeight)")
try:
elements = driver.find_element_by_class_name('text').text
temp={'elements':elements}
chat_text.append(temp)
except:
driver.close()