Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. boton = driver.find_element_by_id('tabComments_btn')
  2. boton.click()
  3.  
  4. wait = WebDriverWait(driver, 100)
  5.  
  6. driver.execute_script("window.scrollTo(0, 1300)")
  7. botonTodos= driver.find_element_by_class_name('thread-node-children-load-all-btn')
  8.  
  9. wait = WebDriverWait(driver, 100)
  10.  
  11. botonTodos.click()
  12.  
  13. wait.until(EC.presence_of_element_located((By.CLASS_NAME, 'thread-node-message')))
  14.  
  15. for elm in driver.find_elements_by_css_selector(".thread-node-message"):
  16. print(elm.text)
  17.  
  18. <a href="#" class="thread-node-btn thread-node-children-load-next-btn">Load next 10 comments</a>
  19. <a href="#" class="thread-node-btn thread-node-children-load-all-btn">Load all comments</a>
  20. <a href="#" class="thread-node-btn thread-node-btn-post">Publicar un comentario</a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement