Basic Url Web Scraping met Python en Beautiful Soup

Deze basic tutorial legt kort uit hoe je url’s kan scrapen van een willekeurige website. Met behulp van Python en Beautiful Soup kun je alle elementen van een pagina scrapen.

Get started with coding by using the code below. Tools to run Python: https://www.anaconda.com and use Jupyter notebook within Anaconda

Code: from bs4 import BeautifulSoup import urllib.request html_page = urllib.request.urlopen(“https://www.nytimes.com”) soup = BeautifulSoup(html_page, “html.parser”) for link in soup.findAll(‘a’): print(link.get(‘href’))

Basic Url Web Scraping met Python en Beautiful Soup
Schuiven naar boven