diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-29 07:57:54 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-03-29 07:57:54 +0100 |
commit | 87e603088ad8e311c11e3e072340588175cc4e6e (patch) | |
tree | 688bcc569c7b00e220744694387f9f6b6ea2ae44 /src/ee/digikey | |
parent | b462f533cba12d58c4b265c0a658909b0752153e (diff) | |
download | ee-python-87e603088ad8e311c11e3e072340588175cc4e6e.tar.gz ee-python-87e603088ad8e311c11e3e072340588175cc4e6e.tar.bz2 ee-python-87e603088ad8e311c11e3e072340588175cc4e6e.tar.xz ee-python-87e603088ad8e311c11e3e072340588175cc4e6e.zip |
DigikeyParser: Picked last and thus wrong description. Be more specific
when selecting description element.
Diffstat (limited to 'src/ee/digikey')
-rw-r--r-- | src/ee/digikey/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ee/digikey/__init__.py b/src/ee/digikey/__init__.py index 2fe7443..9815a8f 100644 --- a/src/ee/digikey/__init__.py +++ b/src/ee/digikey/__init__.py @@ -312,8 +312,7 @@ class DigikeyParser(object): p = DigikeyProduct(part_number, mpn, url, attributes, categories) p.price_breaks = self._parse_price_breaks(tree) p.documents = self._parse_documents(tree) - for n in tree.xpath("//*[@itemprop='description']"): - p.description = _to_string(n) + p.description = _to_string(_first(tree.xpath("//*[@id='product-overview']//*[@itemprop='description']"))) return p return None |