mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[IdealoBridge] added Header with user-agent and fixed typo (#3897)
* Added header with useragent * copy paste error from local test environment * Fixed missing space in New before * fixed missing space after comma in argument list
This commit is contained in:
parent
6eaf0eaa56
commit
6408123330
@ -42,8 +42,13 @@ class IdealoBridge extends BridgeAbstract
|
|||||||
|
|
||||||
public function collectData()
|
public function collectData()
|
||||||
{
|
{
|
||||||
|
// Needs header with user-agent to function properly.
|
||||||
|
$header = [
|
||||||
|
'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15'
|
||||||
|
];
|
||||||
|
|
||||||
$link = $this->getInput('Link');
|
$link = $this->getInput('Link');
|
||||||
$html = getSimpleHTMLDOM($link);
|
$html = getSimpleHTMLDOM($link, $header);
|
||||||
|
|
||||||
// Get Productname
|
// Get Productname
|
||||||
$titleobj = $html->find('.oopStage-title', 0);
|
$titleobj = $html->find('.oopStage-title', 0);
|
||||||
@ -80,7 +85,7 @@ class IdealoBridge extends BridgeAbstract
|
|||||||
// Generate Content
|
// Generate Content
|
||||||
if ($PriceNew > 1) {
|
if ($PriceNew > 1) {
|
||||||
$content = "<p><b>Price New:</b><br>$PriceNew</p>";
|
$content = "<p><b>Price New:</b><br>$PriceNew</p>";
|
||||||
$content .= "<p><b>Price Newbefore:</b><br>$OldPriceNew</p>";
|
$content .= "<p><b>Price New before:</b><br>$OldPriceNew</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getInput('MaxPriceNew') != '') {
|
if ($this->getInput('MaxPriceNew') != '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user