mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 15:06:53 +00:00
Coding policy conformance
More fix to the code
This commit is contained in:
parent
bfe27c96bc
commit
085ccefc2d
@ -54,7 +54,7 @@ class DealabsBridge extends BridgeAbstract {
|
|||||||
. '</td><td>'
|
. '</td><td>'
|
||||||
. $deal->find('div[class=flex flex--align-c flex--justify-space-between space--b-2]', 0)->children(0)->outertext
|
. $deal->find('div[class=flex flex--align-c flex--justify-space-between space--b-2]', 0)->children(0)->outertext
|
||||||
. '</td></table>';
|
. '</td></table>';
|
||||||
$dealDateDiv = $deal->find('div[class=size--all-s flex flex--wrap flex--justify-e flex--grow-1]',0)
|
$dealDateDiv = $deal->find('div[class=size--all-s flex flex--wrap flex--justify-e flex--grow-1]', 0)
|
||||||
->find('span[class=hide--toW3]');
|
->find('span[class=hide--toW3]');
|
||||||
$itemDate = end($dealDateDiv)->plaintext;
|
$itemDate = end($dealDateDiv)->plaintext;
|
||||||
if(substr( $itemDate, 0, 6 ) === 'il y a') {
|
if(substr( $itemDate, 0, 6 ) === 'il y a') {
|
||||||
@ -140,7 +140,7 @@ class DealabsBridge extends BridgeAbstract {
|
|||||||
'js-lazy-img'
|
'js-lazy-img'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$selectorPlain = implode(
|
$selectorPlain = implode(
|
||||||
' ', /* Notice this is a space! */
|
' ', /* Notice this is a space! */
|
||||||
array(
|
array(
|
||||||
@ -163,9 +163,18 @@ class DealabsBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
private function getExpedition($deal)
|
private function getExpedition($deal)
|
||||||
{
|
{
|
||||||
if($deal->find('span[class=meta-ribbon overflow--wrap-off space--l-3 text--color-greyShade]', 0) != null) {
|
$selector = implode(
|
||||||
|
' ', /* Notice this is a space! */
|
||||||
|
array(
|
||||||
|
'meta-ribbon',
|
||||||
|
'overflow--wrap-off',
|
||||||
|
'space--l-3',
|
||||||
|
'text--color-greyShade'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if($deal->find('span[class='. $selector .']', 0) != null) {
|
||||||
return '<div>'
|
return '<div>'
|
||||||
. $deal->find('span[class=meta-ribbon overflow--wrap-off space--l-3 text--color-greyShade]', 0)->children(2)->plaintext
|
. $deal->find('span[class='. $selector .']', 0)->children(2)->plaintext
|
||||||
. '</div>';
|
. '</div>';
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
Reference in New Issue
Block a user