Skip to content

Instantly share code, notes, and snippets.

@abelsonlive
Created September 6, 2013 19:46
Show Gist options
  • Save abelsonlive/6468956 to your computer and use it in GitHub Desktop.
Save abelsonlive/6468956 to your computer and use it in GitHub Desktop.
run this first, ask questions later
from selenium import webdriver
from random import choice
import time
b = webdriver.Firefox()
b.get("http://www.nytimes.com/interactive/2013/09/02/sports/tennis/tennis-grunts-soundboard.html")
grunt_div = b.find_element_by_id('nytmm')
face_divs = grunt_div.find_elements_by_tag_name('div')
interval = [float(s)/100 for s in range(50,151,1)]
while True:
face = choice(face_divs)
try:
face.click()
# time.sleep(choice(interval))
except:
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment