daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 69 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. from selenium import webdriver
  2.  
  3. # Change path here obviously
  4. driver = webdriver.Chrome('C:/Users/Jason/Downloads/chromedriver')
  5. driver.get('https://www.twitch.tv/dyrus/videos/all')
  6. link_element = driver.find_elements_by_xpath("//*[@href]")
  7.  
  8.  
  9. for link in link_element:
  10.     print(link.get_attribute('href'))
  11.  
  12. driver.close()
  13.    
  14. from selenium import webdriver
  15. from selenium.webdriver.common.by import By
  16. from selenium.webdriver.support.ui import WebDriverWait
  17. from selenium.webdriver.support import expected_conditions as EC    
  18.  
  19. # Change path here obviously
  20. driver = webdriver.Chrome('C:/Users/Jason/Downloads/chromedriver')
  21. driver.get('https://www.twitch.tv/dyrus/videos/all')
  22. links = WebDriverWait(driver, 10).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR), "a[data-a-target='preview-card-image-link']"))
  23.  
  24. for link in links:
  25.     print(link.get_attribute('href'))
  26.  
  27. driver.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top