Skip to content
Snippets Groups Projects
Commit 5acc7cbb authored by Farhan Mohammed's avatar Farhan Mohammed
Browse files

Basic scraper added

parent 2bcdef31
No related branches found
No related tags found
No related merge requests found
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment