I’m trying to build a webscraper as part of the 11-7 exercise and I’m running into an issue with the code. The goal was to pull in the new questions from stackoverflow
Problem is, the class designation in the video no longer matches the website. I’ve tried to adjust for it but I’m still returning no values.
import requests
from bs4 import BeautifulSoup
response = requests.get(“Newest Questions - Stack Overflow”)
soup = BeautifulSoup(response.text, “html.parser”)
#questions = soup.select(".question-summary") ← this was the original code but class name changed on the website
questions = soup.select(".s-post-summary js-post-summary")
print(type(questions[0]))