From 87e603088ad8e311c11e3e072340588175cc4e6e Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 29 Mar 2019 07:57:54 +0100 Subject: DigikeyParser: Picked last and thus wrong description. Be more specific when selecting description element. --- src/ee/digikey/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ee/digikey') 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 -- cgit v1.2.3