mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 02:24:35 +02:00
fix: various small fixes (#3578)
This commit is contained in:
parent
11ce8b5dcd
commit
701fe3cfed
13 changed files with 87 additions and 39 deletions
|
@ -66,16 +66,27 @@ class EBayBridge extends BridgeAbstract
|
|||
$new_listing_label->remove();
|
||||
}
|
||||
|
||||
$item['title'] = $listing->find('.s-item__title', 0)->plaintext;
|
||||
$listingTitle = $listing->find('.s-item__title', 0);
|
||||
if ($listingTitle) {
|
||||
$item['title'] = $listingTitle->plaintext;
|
||||
}
|
||||
|
||||
$subtitle = implode('', $listing->find('.s-item__subtitle'));
|
||||
|
||||
$item['uri'] = $listing->find('.s-item__link', 0)->href;
|
||||
$listingUrl = $listing->find('.s-item__link', 0);
|
||||
if ($listingUrl) {
|
||||
$item['uri'] = $listingUrl->href;
|
||||
} else {
|
||||
$item['uri'] = null;
|
||||
}
|
||||
|
||||
preg_match('/.*\/itm\/(\d+).*/i', $item['uri'], $matches);
|
||||
$item['uid'] = $matches[1];
|
||||
if (preg_match('/.*\/itm\/(\d+).*/i', $item['uri'], $matches)) {
|
||||
$item['uid'] = $matches[1];
|
||||
}
|
||||
|
||||
$priceDom = $listing->find('.s-item__details > .s-item__detail > .s-item__price', 0);
|
||||
$price = $priceDom->plaintext ?? 'N/A';
|
||||
|
||||
$price = $listing->find('.s-item__details > .s-item__detail > .s-item__price', 0)->plaintext;
|
||||
$shippingFree = $listing->find('.s-item__details > .s-item__detail > .s-item__freeXDays', 0)->plaintext ?? '';
|
||||
$localDelivery = $listing->find('.s-item__details > .s-item__detail > .s-item__localDelivery', 0)->plaintext ?? '';
|
||||
$logisticsCost = $listing->find('.s-item__details > .s-item__detail > .s-item__logisticsCost', 0)->plaintext ?? '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue