Guest User

Untitled

a guest
Feb 8th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.33 KB | None | 0 0
  1. require 'selenium-webdriver'
  2.  
  3. browser = Selenium::WebDriver.for :firefox
  4.  
  5. browser.get 'https://www.youtube.com/user/russianstandup'
  6. count = 0
  7. while true
  8. begin
  9. button = browser.find_element(:class, "primary-header-actions")
  10. count = count + 1
  11. button.click
  12. puts "click #{count}"
  13. sleep 1
  14. rescue
  15.   puts "wait"
  16.   sleep 5
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment