aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ee/digikey/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ee/digikey/__init__.py b/src/ee/digikey/__init__.py
index f67e6b5..d0405f1 100644
--- a/src/ee/digikey/__init__.py
+++ b/src/ee/digikey/__init__.py
@@ -311,7 +311,12 @@ class DigikeyParser(object):
@staticmethod
def _find_currency(tree: html) -> Optional[str]:
- for e in tree.xpath("//*[@id='cur-dropdown']"):
+ for e in tree.xpath(".//div[@class='cur-dropdown']/ul"):
+ s = _clean(e.text)
+ if s:
+ return s
+
+ for e in tree.xpath("(//*[@class='locale--lang-cur']/*)[last()]"):
s = _clean(e.text)
if s:
return s