Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Optional<ProductDescription> extractProductDescription() {
if (productElement == null)
return Optional.empty();

Optional<Element> productIdElement = Optional.ofNullable(productElement.selectFirst("div.productBuyArea > div.productBuy > p > span"));
Optional<Element> productIdElement = Optional.ofNullable(productElement.selectFirst("div.productBuyArea > div.productBuy > small > span > b"));
Optional<Element> productNameElement = Optional.ofNullable(productElement.selectFirst("div.productBuyArea > div.productBuy > h1"));
Optional<Element> productImageElement = Optional.ofNullable(document.selectFirst("img[itemprop=image]"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class TestPriceExtractor {
*/ @ParameterizedTest
@CsvSource({
"testdata/reichelt/reichelt-p10228.html, 0.07, ''",
"testdata/reichelt/reichelt-p58170.html, 2.20, '10:2.090,50:1.870,100:1.650'"
"testdata/reichelt/reichelt-p58170.html, 2.10, '10:1.995,50:1.785,100:1.575'"
})
public void testExtractPricing(String fileName, String expectedUnitPriceStr, String expectedDiscountsStr) throws IOException {
BigDecimal expectedUnitPrice = new BigDecimal(expectedUnitPriceStr);
Expand Down
88 changes: 57 additions & 31 deletions src/test/resources/testdata/reichelt/reichelt-p10228.html

Large diffs are not rendered by default.

111 changes: 72 additions & 39 deletions src/test/resources/testdata/reichelt/reichelt-p58170.html

Large diffs are not rendered by default.