1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-29 12:50:18 +02: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:
SebLaus
2024-01-19 03:59:47 +01:00
committed by GitHub
parent 6eaf0eaa56
commit 6408123330

View File

@@ -42,8 +42,13 @@ class IdealoBridge extends BridgeAbstract
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');
$html = getSimpleHTMLDOM($link);
$html = getSimpleHTMLDOM($link, $header);
// Get Productname
$titleobj = $html->find('.oopStage-title', 0);
@@ -80,7 +85,7 @@ class IdealoBridge extends BridgeAbstract
// Generate Content
if ($PriceNew > 1) {
$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') != '') {