FIX: Only display the first listed price ()

Multiple prices may be returned by Amazon (e.g. for new, and also for used). We should only display the first price.
This commit is contained in:
jbrw 2022-03-08 15:24:45 -05:00 committed by GitHub
parent bf252752e7
commit 528c3e311a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -124,7 +124,7 @@ module Onebox
elsif !raw.css("#priceblock_ourprice").inner_text.empty?
raw.css("#priceblock_ourprice").inner_text
else
result = raw.css('#corePrice_feature_div .a-price .a-offscreen').inner_text
result = raw.css('#corePrice_feature_div .a-price .a-offscreen').first&.inner_text
if result.blank?
result = raw.css(".mediaMatrixListItem.a-active .a-color-price").inner_text
end