AttributeError while scraping
问题 I am trying to scrape a website, I have got this error: AttributeError: 'NoneType' object has no attribute 'text' at ---> 12 for x in soup.select("div.site-content")] The code used is: rq = req.get("https://stopcensura.net/category/cronaca") soup = BeautifulSoup(rq.content, 'html.parser') scrape_info = [(x.h3.a.text, x.time.text) for x in soup.select("div.site-content")] I would like to get infnormation on title ( entry-title ), date ( class="date" ), the author ( <div class="by-author vcard