browser.get(
    'http://www.dinamalar.com/user_comments.asp?uid=14701&name=%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D%E0%AE%9A%E0%AF%86%E0%AE%B2%E0%AF%8D%E0%AE%B5%E0%AE%A9%E0%AF%8D'
    )
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, '.morered')))
pages = 1
while True:
    browser.find_elements_by_css_selector('.morered')[-1].click()
try:
    wait.until(lambda browser: len(browser.find_elements_by_css_selector(
        '.morered')) > pages)
except TimeoutException:
    break
print('Comments loaded: %d' % len(browser.find_elements_by_css_selector(
    '.dateg')))
pages += 1
browser.close()
Extracting user comments from news website