aboutsummaryrefslogtreecommitdiff
path: root/src/ee/digikey
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-10-01 21:40:03 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-10-01 21:40:03 +0200
commit5cb42a172fa75c8d121c3df293c2bf53f9cad026 (patch)
tree53fb1fdcfa8cb44e1bf328fab273184e20a29f1e /src/ee/digikey
parent1666cb723a96d33e249057c1f5fdb28b59f01dba (diff)
downloadee-python-5cb42a172fa75c8d121c3df293c2bf53f9cad026.tar.gz
ee-python-5cb42a172fa75c8d121c3df293c2bf53f9cad026.tar.bz2
ee-python-5cb42a172fa75c8d121c3df293c2bf53f9cad026.tar.xz
ee-python-5cb42a172fa75c8d121c3df293c2bf53f9cad026.zip
o Better text extraction, fixing bug where 'Packaging' was not included.
Diffstat (limited to 'src/ee/digikey')
-rw-r--r--src/ee/digikey/__init__.py5
1 files changed, 3 insertions, 2 deletions
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