Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. count = 0
  2. for i in range(0,len(url_list)-1):
  3.         # Access URL from list
  4.         url = (url_list[i])
  5.         driver.get(url)
  6.         try:
  7.             driver.find_element_by_class_name('js-share').click()
  8.             pass
  9.         except (NoSuchElementException, ElementNotVisibleException) as e:        
  10.             pass
  11.         try:
  12.             driver.find_element_by_xpath("/html/body/div[8]/div[2]/form/div[3]/button").click()
  13.             pass
  14.         except (NoSuchElementException, ElementNotVisibleException) as e:
  15.             pass
  16.         count +=1
  17.         print(count)
  18. print('Job Done')
  19. driver.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement