From 456a0fab72cb20c889ef95ef33e2beca591e8f8e Mon Sep 17 00:00:00 2001 From: Lucia Walinchus Date: Fri, 2 Jun 2017 13:21:25 -0500 Subject: [PATCH] Update scraper.py --- scraper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scraper.py b/scraper.py index 19e02fa..b0cf86a 100644 --- a/scraper.py +++ b/scraper.py @@ -31,13 +31,13 @@ def scrapepdf(url): #so we use try here to stop it breaking the whole thing try: #This line tests how many matches we get - print 'SCHOOL NAME? ', name.text.encode('ascii', 'ignore') + print 'SCHOOL NAME? ', name.text.encode('ascii', 'ignore') #There's only one when tested, so let's store the first and only match #see https://docs.python.org/2/howto/unicode.html #for more on .encode('ascii', 'xmlcharrefreplace') record['schoolname'] = schoolname[0].text.encode('ascii', 'xmlcharrefreplace') - except AttributeError: - print 'AttributeError - ignored' + except AttributeError: + print 'AttributeError - ignored' #Now the date, which is in