From deaae30bb1838626130df8d4dd29a839f1135e89 Mon Sep 17 00:00:00 2001 From: emilylowes <44525402+emilylowes@users.noreply.github.com> Date: Tue, 26 Feb 2019 12:02:46 +0000 Subject: [PATCH] Update scraper.py --- scraper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraper.py b/scraper.py index f778d97..66a757e 100644 --- a/scraper.py +++ b/scraper.py @@ -9,10 +9,10 @@ # # # Find something on the page using css selectors root = lxml.html.fromstring(html) -root.cssselect("a") +root.cssselect("ul li a") #cssselect is a selector, root stores the html so we can explore the data, cssselect will grab anything under an "a" tag, which is #then stored in new variable links. -links = root.cssselect("a") +links = root.cssselect("ul li a") print (links)