You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defget_data(url):
# Package the request, send the request and catch the response: rr=requests.get(url)
ifr.status_code==requests.codes.ok:
# Extracts the response as html: html_dochtml_doc=r.text# Create a BeautifulSoup object from the HTML: soupsoup=BeautifulSoup(html_doc,"html.parser")
title_tags=soup.find_all('h4', attrs={'class': 'article-title'})
intro_tags=soup.find_all('p', attrs={'class': 'article-intro'})