Skip to content

Instantly share code, notes, and snippets.

@halit
Created August 8, 2012 09:56
Show Gist options
  • Save halit/3293917 to your computer and use it in GitHub Desktop.
Save halit/3293917 to your computer and use it in GitHub Desktop.
Google Doodle Hack(Python and Selenium)
from selenium import webdriver
from selenium.webdriver.common.keys import Keys as k
br = webdriver.Chrome()
br.get(r'http://google.com')
elem = br.find_element_by_id('hplogo')
def mashButton(loops):
for i in xrange(loops):
elem.send_keys(k.LEFT)
elem.send_keys(k.RIGHT)
mashButton(200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment