Comparto el codigo que esto escribiendo segun el video, no veo ningun error
from bs4 import BeautifulSoup
from bs4 import BeautifulSoup
import requests
GOOGLES_NEWS_URL = 'https://news.google.com'
def scraping_site():
re = requests.get( GOOGLES_NEWS_URL )
if re.status_code == 200:
soup = BeautifulSoup( re.text, 'html.parser' )
if soup is not None:
articles = soup.find_all('h4', {
'class': 'ipQwMb ekueJc gEATFF RD0gLb'
})
for article in articles:
title = article.find('a', {
'class': 'DY5T1d'
})
print(title)
if __name__ == '__main__':
scraping_site()