mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[PepperBridge] Fix date parsing (#3727)
Website changed the date display. This fix adapt the date parsing to the new website date display
This commit is contained in:
parent
59dd49671d
commit
1cbe1a6f98
@ -3316,6 +3316,7 @@ class HotUKDealsBridge extends PepperBridgeAbstract
|
|||||||
'and '
|
'and '
|
||||||
],
|
],
|
||||||
'date-prefixes' => [
|
'date-prefixes' => [
|
||||||
|
'Posted ',
|
||||||
'Found ',
|
'Found ',
|
||||||
'Refreshed ',
|
'Refreshed ',
|
||||||
'Made hot '
|
'Made hot '
|
||||||
|
@ -128,9 +128,9 @@ class PepperBridgeAbstract extends BridgeAbstract
|
|||||||
$clock = end($clocks);
|
$clock = end($clocks);
|
||||||
|
|
||||||
// Find the text corresponding to the clock
|
// Find the text corresponding to the clock
|
||||||
$spanDateDiv = $clock->parent()->find('span[class=hide--toW3]', 0);
|
$spanDateDiv = $clock->next_sibling();
|
||||||
$itemDate = $spanDateDiv->plaintext ?? '';
|
$itemDate = $spanDateDiv->plaintext;
|
||||||
// In case of a Local deal, there is no date, but we can use
|
// In some case of a Local deal, there is no date, but we can use
|
||||||
// this case for other reason (like date not in the last field)
|
// this case for other reason (like date not in the last field)
|
||||||
if ($this->contains($itemDate, $this->i8n('localdeal'))) {
|
if ($this->contains($itemDate, $this->i8n('localdeal'))) {
|
||||||
$item['timestamp'] = time();
|
$item['timestamp'] = time();
|
||||||
|
Loading…
Reference in New Issue
Block a user