Newer
Older
import requests as r
from bs4 import BeautifulSoup
def scrape_webpage(link):
resp = r.get(link)
soupObject = BeautifulSoup(resp.content, "html.parser")
text = soupObject.text
return text
t = scrape_webpage("https://news.yahoo.com/monterey-park-mass-shooting-everything-we-know-about-the-lunar-new-year-massacre-165348528.html?guccounter=1")
print(t)