Created
September 6, 2013 19:46
-
-
Save abelsonlive/6468956 to your computer and use it in GitHub Desktop.
run this first, ask questions later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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