Skip to content

Commit

Permalink
[Billa] Ignore app when in cyrillic
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Sep 5, 2023
1 parent 3cd96dd commit 81b6eb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ class BillaProductsExtractor : UrlProductsExtractor {
)

private val regexesToDeleteBilla =
listOf(
"с (Billa|билла|била) (card|app)".toRegex(IGNORE_CASE),
)
listOf("с (Billa|билла|била) (card|app|арр)".toRegex(IGNORE_CASE))

override fun extract(url: URL): List<Product> {
log.info("Processing Billa URL: {}", url.toString())
Expand Down
10 changes: 10 additions & 0 deletions src/test/resources/extractors/billa/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -3685,6 +3685,16 @@
<div style="float:left; width:15%">
<span class="price">11.995</span><span class="currency">лв.</span></div>
</div>
<div class="product">
<div class="actualProduct" style="float:left; width:25%; margin-right:2%;">Само с BILLA Арр Ракия Троянска сливова отлежала 0.7л Произход - България</div>
<div class="priceText" style="float:left; width:10%;">СТАРА<br>ЦЕНА</div>
<div style="float:left; width:22%">
<span class="price">19.99</span> <span class="currency">лв.</span> </div>
<div class="priceText" style="float:left; width:10%;">НОВА<br>ЦЕНА</div>
<div class="discount" style="float:left; width:10%;"> - -30%</div>
<div style="float:left; width:15%">
<span class="price">13.99</span><span class="currency">лв.</span> </div>
</div>
</div>
</div>

Expand Down

0 comments on commit 81b6eb0

Please sign in to comment.