Currently using Selenium+ Python and this code:
browser.get('http://www.google.com')
search = browser.find_element_by_name('q')
search.send_keys("how to search the internet")
search.send_keys(Keys.RETURN) # hit return after you enter search text
time.sleep(5) # sleep for 5 seconds so you can see the results
browser.execute_script("window.scrollTo(0, 873)")
time.sleep(2)
browser.find_element(By.XPATH, '(//h3)[3]/a').click()`
as my code.
What Happens: Goes to Google and types in the words and hits search. Scrolls down a bit and then it clicks the first link
What I want: I want to be able to click a random link from the search result page
How to do this?
Edit: This is what I meant when I said unnecessary: Unnecessary 1: https://i.stack.imgur.com/HBzFg.jpg
Unnecessary 2: https://i.stack.imgur.com/j4xGq.jpg
These are the only results I want: This: https://i.stack.imgur.com/lAdHA.jpg