title: I want to get first 10 images url from google search using Selenium Python
body: <p>I want to get first 10 images url from google search (not base64).
  I have code:</p>
  
  <pre><code>import os
  import base64
  import time
  
  from selenium.webdriver.common.keys import Keys
  from selenium import webdriver
  from webdriver_manager.chrome import ChromeDriverManager
  
  searchterm = 'bananas'  # will also be the name of the folder
  url = "https://www.google.com/search?q=banan&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=2ahUKEwj-75rDlJLoAhWLHHcKHStFC6EQ_AUoAXoECA4QAw&amp;biw=1867&amp;bih=951"
  options = webdriver.ChromeOptions()
  options.add_argument("--start-maximized")
  browser = webdriver.Chrome(executable_path=ChromeDriverManager().install(), options=options)
  browser.get(url)
  actions = webdriver.common.action_chains.ActionChains(browser)
  header = {
      'User-Agent': "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36"}
  counter = 0
  succounter = 0
  
  if not os.path.exists(searchterm):
      os.mkdir(searchterm)
  
  for i in range(0, 11):
      time.sleep(1)
      x = browser.find_elements_by_xpath('//*[@id="islrg"]/descendant::img')[i]
      x.click()
      i += 1
      if i &gt; 10:
          break
      ba = browser.find_element_by_xpath('//* 
      [@id="Sva75c"]/div/div/div[3]/div[2]/div/div[1]/div[1]/div/div[2]/a/img')
      print(ba.get_attribute('src'))
  </code></pre>
  
  <p>It returns image urls, but sometimes base64. How to make the script always return image url?
  Thank you.</p>