title: Google search company names and websites in Selenium pyhon
body: <p>As a starting videographer I am trying to make a list of companies in a specific area.
  So far I was able to get to the results with this code:</p>
  <pre><code>search_input = &quot;hovenier Ridderkerk&quot;
  PATH = **location chromedriver**
  driver = webdriver.Chrome(PATH)
  driver.get(&quot;https://www.google.com&quot;)
  
  cookie_consent = driver.find_element_by_xpath('//*[@id=&quot;L2AGLb&quot;]').click()
  time.sleep(0.5)
  search = driver.find_element_by_xpath('/html/body/div[1]/div[3]/form/div[1]/div[1]/div[1]/div/div[2]/input')
  time.sleep(0.5)
  search.send_keys(search_input)
  time.sleep(0.5)
  search.send_keys(Keys.RETURN)
  time.sleep(0.5)
  show_all = driver.find_element_by_xpath('//*[@id=&quot;rso&quot;]/div[2]/div/div/div/div/div[6]/div/g-more-link/a/div').click()
  time.sleep(0.5)
  </code></pre>
  <p>however after this I am a bit stuck, it appears that the names and websites of these companies are in a lot of classes and I cant figure out over which element I should do an iteration to get all the company names and websites in the list.</p>
  <p>*edit: I added the manual steps that I would like it to do.</p>
  <ol>
  <li>go to google.com</li>
  <li>search for 'hoveniers Ridderkerk' (garden companies)</li>
  <li>show all results</li>
  <li>make a list with all the company names and website addresses*</li>
  </ol>
  <p>Can anyone guide me in the correct direction? perhaps also explaining how they know they should use that specific element, so next time I can do it myself?</p>
  <p>Thank you!</p>