Actual Problem :
Link to scrape : https://www.axisbank.com/retail/cards/credit-card/axis-bank-ace-credit-card/features-benefits#menuTab
Items that I want from that link are there in the following images :
I wrote the following code :
from urllib.request import urlopen
from bs4 import BeautifulSoup
import json, requests, re
from selenium import webdriver
s = 'https://www.axisbank.com/retail/cards/credit-card/axis-bank-ace-credit-card/features-benefits#menuTab'
driver = webdriver.Chrome(executable_path="C:\\Users\\Hari\\Downloads\\chromedriver.exe")
driver.get(s)
soup = BeautifulSoup(driver.page_source, 'lxml')
# print(x.find('h3').get_text())
det = []
a = soup.find('div', class_ = 'owl-stage')
for x in a.find_all('div', class_ = 'owl-item'):
print(x.find('li').get_text())
driver.close()
I tried the above code but got stuck after I got this output
Output
Traceback (most recent call last):
File "C:\Users\Hari\PycharmProjects\Card_Prj\buffer.py", line 22, in <module>
print(x.find('li').get_text())
AttributeError: 'NoneType' object has no attribute 'get_text'
I don't know how to proceed further and scrape the information that I want, any help is highly appreciated.