FIX: Only display the first listed price (#16138)
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:
parent
bf252752e7
commit
528c3e311a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue