From e241f3dcde39e350d30ba22a10c8d5c17a9ea93d Mon Sep 17 00:00:00 2001 From: sysadminstory Date: Mon, 4 Aug 2025 00:48:27 +0200 Subject: [PATCH] [PepperBridgeAbstract, DealabsBridge, HotUKDealsBridge, MydealsBridge] Adapt RSS bridge to website content update; remove country of origin due to missing data (#4634) Website use now "vue3" and some class and attributes have changed their names : bridge was updated to use the new class and attribute names Country of origin has been removed from the deal list : it's for now disabled, but code is still present in the bridge, in case the website enable it again. --- bridges/PepperBridgeAbstract.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bridges/PepperBridgeAbstract.php b/bridges/PepperBridgeAbstract.php index 43dbe829..86a488c4 100644 --- a/bridges/PepperBridgeAbstract.php +++ b/bridges/PepperBridgeAbstract.php @@ -62,7 +62,8 @@ class PepperBridgeAbstract extends BridgeAbstract foreach ($list as $deal) { // Get the JSON Data stored as vue $jsonDealData = $this->getDealJsonData($deal); - $dealMeta = Json::decode($deal->find('div[class=js-vue2]', 1)->getAttribute('data-vue2')); + // DEPRECATED : website does not show this info in the deal list anymore + // $dealMeta = Json::decode($deal->find('div[class=js-vue3]', 1)->getAttribute('data-vue3')); $item = []; $item['uri'] = $this->getDealURI($jsonDealData); @@ -77,7 +78,10 @@ class PepperBridgeAbstract extends BridgeAbstract . $this->getHTMLTitle($jsonDealData) . $this->getPrice($jsonDealData) . $this->getDiscount($jsonDealData) - . $this->getShipsFrom($dealMeta) + /* + * DEPRECATED : the list does not show this info anymore + * . $this->getShipsFrom($dealMeta) + */ . $this->getShippingCost($jsonDealData) . $this->getSource($jsonDealData) . $this->getDealLocation($jsonDealData) @@ -354,7 +358,7 @@ HEREDOC; */ private function getDealJsonData($deal) { - $data = Json::decode($deal->find('div[class=js-vue2]', 0)->getAttribute('data-vue2')); + $data = Json::decode($deal->find('div[class=js-vue3]', 0)->getAttribute('data-vue3')); return $data; } @@ -419,7 +423,7 @@ HEREDOC; private function getImage($deal) { // Get thread Image JSON content - $content = Json::decode($deal->find('div[class=js-vue2]', 0)->getAttribute('data-vue2')); + $content = Json::decode($deal->find('div[class=js-vue3]', 0)->getAttribute('data-vue3')); //return ''; return '