diff options
author | Yorhel <git@yorhel.nl> | 2019-09-04 08:53:07 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-09-04 08:53:07 +0200 |
commit | 379c6921180b92c24fe6ade058ac083b3da61533 (patch) | |
tree | 2395048fa9335d6305d76d047af79ebc6df5cad7 /lib/Multi | |
parent | 01f935095c90a4419fd9dfbb806fece94262cf89 (diff) |
Multi::JList: Fix parsing of special discount prices
Diffstat (limited to 'lib/Multi')
-rw-r--r-- | lib/Multi/JList.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Multi/JList.pm b/lib/Multi/JList.pm index 8c5218cd..c3842b8b 100644 --- a/lib/Multi/JList.pm +++ b/lib/Multi/JList.pm @@ -51,7 +51,7 @@ sub data { my $found = $hdr->{Status} ne '404' && $body =~ /fancybox mainProductImage/; my $outofstock = $body =~ /<div class="statusBox-detail">[\s\r\n]*Out of stock[\s\r\n]*<\/div>/im; - my $price = $body =~ /<span class="price">\$(\d+\.\d+)(?:\/\$\d+\.\d+)?<\/span>/ ? sprintf('US$ %.2f', $1) : ''; + my $price = $body =~ /<span class="price"(?: id="product-price-\d+")?>\s*\$(\d+\.\d+)(?:\/\$\d+\.\d+)?\s*<\/span>/ ? sprintf('US$ %.2f', $1) : ''; return AE::log warn => "$prefix Product found, but no price" if !$price && $found && !$outofstock; |