Trying to extract article text from a list of urls
for url_index in len(urls): req = requests.get(urls[url_index]) soup = BeautifulSoup(req.text, ‘html.parser’) article = soup.find_all(‘div’, attrs={‘class’,’p’}) for i in range(len(articles)): # Print the index and the text of each article print(f”Article {i + 1 + url_index * len(articles)}: {articles[i].text}”) In the first for loop, inside the variable article I’m trying to get the text from tag […]