mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-16 23:41:29 +02:00
Merge d0b31f3a3b
into 4c0b97d605
This commit is contained in:
commit
492ca7d15a
1 changed files with 9 additions and 4 deletions
|
@ -62,7 +62,8 @@ class PepperBridgeAbstract extends BridgeAbstract
|
||||||
foreach ($list as $deal) {
|
foreach ($list as $deal) {
|
||||||
// Get the JSON Data stored as vue
|
// Get the JSON Data stored as vue
|
||||||
$jsonDealData = $this->getDealJsonData($deal);
|
$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 = [];
|
||||||
$item['uri'] = $this->getDealURI($jsonDealData);
|
$item['uri'] = $this->getDealURI($jsonDealData);
|
||||||
|
@ -77,7 +78,10 @@ class PepperBridgeAbstract extends BridgeAbstract
|
||||||
. $this->getHTMLTitle($jsonDealData)
|
. $this->getHTMLTitle($jsonDealData)
|
||||||
. $this->getPrice($jsonDealData)
|
. $this->getPrice($jsonDealData)
|
||||||
. $this->getDiscount($jsonDealData)
|
. $this->getDiscount($jsonDealData)
|
||||||
. $this->getShipsFrom($dealMeta)
|
/*
|
||||||
|
* DEPRECATED : the list does not show this info anymore
|
||||||
|
* . $this->getShipsFrom($dealMeta)
|
||||||
|
*/
|
||||||
. $this->getShippingCost($jsonDealData)
|
. $this->getShippingCost($jsonDealData)
|
||||||
. $this->getSource($jsonDealData)
|
. $this->getSource($jsonDealData)
|
||||||
. $this->getDealLocation($jsonDealData)
|
. $this->getDealLocation($jsonDealData)
|
||||||
|
@ -354,7 +358,7 @@ HEREDOC;
|
||||||
*/
|
*/
|
||||||
private function getDealJsonData($deal)
|
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;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -419,7 +423,7 @@ HEREDOC;
|
||||||
private function getImage($deal)
|
private function getImage($deal)
|
||||||
{
|
{
|
||||||
// Get thread Image JSON content
|
// 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 '<img src="' . $content['props']['threadImageUrl'] . '"/>';
|
//return '<img src="' . $content['props']['threadImageUrl'] . '"/>';
|
||||||
return '<img src="' . $this->i8n('image-host') . $content['props']['thread']['mainImage']['path'] . '/'
|
return '<img src="' . $this->i8n('image-host') . $content['props']['thread']['mainImage']['path'] . '/'
|
||||||
. $content['props']['thread']['mainImage']['name'] . '/re/202x202/qt/70/'
|
. $content['props']['thread']['mainImage']['name'] . '/re/202x202/qt/70/'
|
||||||
|
@ -429,6 +433,7 @@ HEREDOC;
|
||||||
/**
|
/**
|
||||||
* Get the originating country from a Deal if it exists
|
* Get the originating country from a Deal if it exists
|
||||||
* @return string String of the deal originating country
|
* @return string String of the deal originating country
|
||||||
|
* DEPRECATED : the deal on the result list does not contain this info anymore
|
||||||
*/
|
*/
|
||||||
private function getShipsFrom($dealMeta)
|
private function getShipsFrom($dealMeta)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue