From 5abc1b0d9c37c75c253949293c1c0bb20c763f8f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 15 Feb 2013 21:29:20 -0500 Subject: [PATCH] scrape.nasdaq: Strip whitespace from scraped values For example, I was getting '\nDIR\n' as a relation code. --- insider/scrape/nasdaq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/insider/scrape/nasdaq.py b/insider/scrape/nasdaq.py index 4ee45af..9e908d6 100644 --- a/insider/scrape/nasdaq.py +++ b/insider/scrape/nasdaq.py @@ -83,7 +83,7 @@ def get_trades(ticker): LOG.debug('wrong class ({}, expected {})'.format( classes, class_)) break # wrong class - value = tds[i].text + value = tds[i].text.strip() if class_ == 'Holdnum': # decode numerical values if value == '-': value = None -- 2.26.2