title: Get image url with BeautifulSoup where src= data:image/gif;base64,
body: <p>I am trying to get urls of images in a webpage using Python and BeautifulSoup4</p>
  <p>My current code is</p>
  <pre><code>
  import requests
  
  from bs4 import BeautifulSoup
  
  url=&quot;https://goibibo.com/hotels/hotels-in-shimla-ct/&quot;
  
  #Headers
  
  headers={
      'User-Agent':&quot;Mozilla/5.0 (x11; Linux x86_64) AppleWebkit/537.36 (KHTML, like Gecko Chrome 77.0.3865.90 Safari/537.36)&quot;
  }
  
  data = requests.get(url,headers=headers).text
  soup = BeautifulSoup(data, 'html.parser')
  
  images = soup.find_all('img',src=True)
  
  print('Number of Images: ', len(images))
  print('\n')
  for image in images:
      if(image.has_attr('src')):
          print(image['src'])
  </code></pre>
  <p>When I inspect the image element it has a proper URL (src=&quot;https://cdn1.goibibo.com/voy_ing/t_g/812aa1726b8211e7a0a10a4cef95d023.jpg&quot;). However, when I get the src value of the img element using BeautifulSoup4, it returns data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7</p>
  <p>How can I get the image url given in the webpage?</p>