I have a list of urls and I want my code to loop through multiple pages of these multiple urls
urls = ['https://www.f150forum.com/f118/2019-adding-adaptive-cruise-454662/','https://www.f150forum.com/f118/adaptive-cruise-control-sensor-blockage-446041/']
comments = []
for url in urls:
with requests.Session() as req:
for item in range(1):
response = req.get(url+"index{item}/")
soup = BeautifulSoup(response.content, "html.parser")
for item in soup.findAll('div',attrs={"class":"ism-true"}):
result = [item.get_text(strip=True, separator=" ")]
comments.append(result)
The above code through an error. Can you let me know how to loop through multiple pages. The error I am getting is "NoneType' object has no attribute 'findAll"
r.contentshould beresponse.content