Hello I am new to the field of Data science & currently I am doing project of web scraping. I comes to a problem where I getting error of 'none type object has no attribute text'.I just print out the funtion output without the '.text' getting none value as output anyone please check the code and see where I am going wrong I already put tag and class accordingly.
import requests
from bs4 import BeautifulSoup
from csv import writer
url = 'https://www.99acres.com/search/property/buy/pune? city=19&preference=S&area_unit=1&res_com=R'
R = requests.get(url)
soup = BeautifulSoup(R.content, 'html.parser')
lists = soup.find_all('table', class_='srpTuple__tableFSL')
for list in lists:
title = list.find('h2', class_='srpTuple__tupleTitleOverflow').text
Location = list.find('a', class_='srpTuple__dFlex').text
price = list.find('td', class_ = 'srpTuple__col title_semiBold ')
info = [title,Location,price]
print(info)
Here is the Output :
['2 BHK Apartment in Moshi', 'Flower City', None]
['3 BHK Apartment in Kondhwa', 'Mannat Towers', None]