find('._6a66d_ImOzU', 0)->innertext ?? '';
-
- $price = $post->find('._6a66d_6R3iN', 0)->plaintext;
- $price = empty($auctionTimeLeft) ? $price : $price . '- kwota licytacji';
-
- $image = $post->find('._6a66d_44ioA img', 0)->{'data-src'} ?: $post->find('._6a66d_44ioA img', 0)->src ?? false;
- if ($image) {
- $item['enclosures'] = [$image . '#.image'];
- }
-
- $offerExtraInfo = array_filter($post->find('.mqu1_g3.mgn2_12'), function ($node) {
+ $pricingExtraInfo = array_filter($post->find('.mqu1_g3.mgn2_12'), function ($node) {
return empty($node->find('.mvrt_0'));
});
- $offerExtraInfo = $offerExtraInfo[0]->plaintext ?? '';
+ $pricingExtraInfo = $pricingExtraInfo[0]->plaintext ?? '';
- $isSmart = $post->find('._6a66d_TC2Zk', 0)->innertext ?? '';
- if (str_contains($isSmart, 'z kurierem')) {
- $offerExtraInfo .= ', Smart z kurierem';
- } else {
- $offerExtraInfo .= ', Smart';
+ $offerExtraInfo = array_map(function ($node) {
+ return str_contains($node->plaintext, 'zapłać później') ? '' : $node->outertext;
+ }, $post->find('div.mpof_ki.mwdn_1.mj7a_4.mgn2_12'));
+
+ $isSmart = $post->find('img[alt="Smart!"]', 0) ?? false;
+ if ($isSmart) {
+ $pricingExtraInfo .= $isSmart->outertext;
}
$item['categories'] = [];
@@ -131,11 +136,9 @@ class AllegroBridge extends BridgeAbstract
. ''
. $price
. '
'
- . $auctionTimeLeft
- . '
'
- . $buyNowAuction
+ . implode('
', $offerExtraInfo)
. '
'
- . $offerExtraInfo
+ . $pricingExtraInfo
. '
';
$this->items[] = $item;