Skip to content

Instantly share code, notes, and snippets.

@rvth
Created September 2, 2021 10:20
Show Gist options
  • Save rvth/d18ab629b4083d9cc0bfafea9adeba30 to your computer and use it in GitHub Desktop.
Save rvth/d18ab629b4083d9cc0bfafea9adeba30 to your computer and use it in GitHub Desktop.
url = 'https://www.bbc.co.uk'
req = requests.get(url)
soup = BeautifulSoup(req.text, "html.parser")
for link in soup.find_all('a'):
print(link.get('href'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment