From 757e1c77d43456e4914b860632b7dcff79b5ed1a Mon Sep 17 00:00:00 2001 From: yngveny <31400411+yngveny@users.noreply.github.com> Date: Mon, 25 Sep 2017 13:16:26 +0200 Subject: [PATCH] Update scraper.py --- scraper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scraper.py b/scraper.py index 69d6e79..bc4bed5 100644 --- a/scraper.py +++ b/scraper.py @@ -6,12 +6,15 @@ # create a new function, which gets passed a variable we're going to call 'url' def scrape_dof(url): html = scraperwiki.scrape(url) + #print html root = lxml.html.fromstring(html) + print root.find_class("div.notice-search-item") + #line below selects all
rows = root.cssselect("div.notice-search-item") for row in rows: - print row.find_class("div.notice-search-item") + #print row.find_class("div.notice-search-item") # Set up our data record - we'll need it later record = {} a = row.cssselect("a") #grab all tags within our