From e1171effb1d5a37557142af7a69bde35372fcef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 2 Jan 2019 21:43:53 +0100 Subject: [PATCH] Scraping --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce02c50..fd4506d 100644 --- a/README.md +++ b/README.md @@ -1332,7 +1332,8 @@ Scraping # $ pip3 install requests beautifulsoup4 >>> import requests >>> from bs4 import BeautifulSoup ->>> page = requests.get('https://en.wikipedia.org/wiki/Python_(programming_language)') +>>> url = 'https://en.wikipedia.org/wiki/Python_(programming_language)' +>>> page = requests.get(url) >>> document = BeautifulSoup(page.text, 'html.parser') >>> table = document.find('table', class_='infobox vevent') >>> rows = table.find_all('tr')