title: Not able to scrape image URLs using beautiful soup and python
body: <p>So basically I am using the below code to scrape the image urls of the credit cards from the respective links in the explore_more_url variable.</p>
  <pre><code>from urllib.request import urlopen
  from bs4 import BeautifulSoup
  import json, requests, re
  from selenium import webdriver
  
  driver = webdriver.Chrome(executable_path=&quot;C:\\Users\\Hari\\Downloads\\chromedriver.exe&quot;)
  
  img_url = []
  
  explore_more_url = ['https://www.axisbank.com/retail/cards/credit-card/axis-bank-ace-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-aura-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/privilege-easy-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/reserve-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-freecharge-plus-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/indianoil-axis-bank-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-magnus-card/feature-benefits', 'https://www.axisbank.com/retail/cards/credit-card/flipkart-axisbank-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-freecharge-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/my-zone-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/neo-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-vistara-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-vistara-signature-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-vistara-infinite-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/privilege-credit-card-with-unlimited-travel-benefits-account', 'https://www.axisbank.com/retail/cards/credit-card/miles-more-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-select-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/pride-platinum-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/pride-signature-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/my-zone-easy-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/insta-easy-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/signature-credit-card-with-lifestyle-benefits', 'https://www.axisbank.com/retail/cards/credit-card/platinum-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/titanium-smart-traveler-credit-card', 'https://www.axisbank.com/retail/cards/credit-card/my-wings-credit-card/features-benefits']
  
  for x in explore_more_url:
      driver.get(x)
      soup_1 = BeautifulSoup(driver.page_source, 'lxml')
      img_url.append(&quot;https://www.axisbank.com&quot; + soup_1.find('img', alt=&quot;Fast Forward Banner&quot;).get('src'))
  
  print(img_url)
  </code></pre>
  <p><strong>Output :</strong></p>
  <pre><code>Traceback (most recent call last):
   File &quot;C:\Users\Hari\PycharmProjects\Card_Prj\axis.py&quot;, line 82, in &lt;module&gt;
     img_url.append(&quot;https://www.axisbank.com&quot; + soup_1.find('img', alt=&quot;Fast Forward Banner&quot;).get('src'))
  AttributeError: 'NoneType' object has no attribute 'get'
  </code></pre>
  <p>The images are something like this in each link:
  <a href="https://i.stack.imgur.com/kUIzB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kUIzB.jpg" alt="enter image description here" /></a></p>
  <p>What is the appropriate code that I could use so that I can get exactly what I am expecting ?</p>