From 5cb42a172fa75c8d121c3df293c2bf53f9cad026 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 1 Oct 2017 21:40:03 +0200 Subject: o Better text extraction, fixing bug where 'Packaging' was not included. --- src/ee/digikey/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ee/digikey') diff --git a/src/ee/digikey/__init__.py b/src/ee/digikey/__init__.py index 3b1c52c..003394e 100644 --- a/src/ee/digikey/__init__.py +++ b/src/ee/digikey/__init__.py @@ -219,8 +219,9 @@ class DigikeyClient(object): tds = tr.xpath("th|td") if len(tds) != 3: continue - label = tds[0].text.strip() - value = tds[1].text.strip() + + label = _to_string(tds[0]) + value = _to_string(tds[1]) if len(label) == 0 or len(value) == 0: continue -- cgit v1.2.3