@@ -0,0 +1,1088 @@
+from selenium import webdriver%0Afrom selenium.webdriver.common.keys import Keys%0Aimport time%0A%0Adef setup_browser():%0A    driver = webdriver.Firefox() # can easily be switched to other browsers, e.g. webdriver.Chrome()%0A    go_to_google(driver)%0A    return driver%0A%0Adef perform_search(driver, search_terms):%0A    search_box = driver.find_element_by_id(%22gbqfq%22)%0A    search_box.clear()%0A    search_box.send_keys(search_terms)%0A    search_box.send_keys(Keys.RETURN)%0A%0Adef click_on_result(driver):%0A%09time.sleep(1)%0A%09first_result = driver.find_element_by_css_selector(%22li.g:nth-child(3) %3E div:nth-child(1) %3E h3:nth-child(1) %3E a:nth-child(1)%22)%0A%09first_result.click()%0A%0Adef go_to_google(driver):%0A    driver.get(%22https://www.google.com/%22)%0A%0Adef main():%0A    driver = setup_browser()%0A    i = 0%0A    number_of_searches_total = 1000%0A    while(i %3C number_of_searches_total): # so the script won't run forever%0A        go_to_google(driver)%0A        search_terms = str(i)%0A        perform_search(driver, search_terms)%0A        click_on_result(driver)%0A        i+=1%0A        time.sleep(5)%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

Create script.py