Commit 0810b0fa authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '50-fairmondo-de' into 'master'

Fairmondo eingebaut

Closes #50

See merge request !99
parents 576ca269 dfe22672
...@@ -18,10 +18,17 @@ class Fairmondo extends Searchengine ...@@ -18,10 +18,17 @@ class Fairmondo extends Searchengine
$results = $results["articles"]; $results = $results["articles"];
foreach($results as $result) foreach($results as $result)
{ {
if( $this->counter >= 10 )
break;
$title = $result["title"]; $title = $result["title"];
$link = $result["html_url"]; $link = "https://www.fairmondo.de/articles/" . $result["id"];
$anzeigeLink = $link; $anzeigeLink = $link;
$descr = $result["slug"]; $descr = $result["slug"];
if( isset($result['price_cents']))
{
$descr .= " | Preis: " . (intval($result['price_cents']) / 100.0) . " €";
}
$this->counter++; $this->counter++;
$this->results[] = new \App\Models\Result( $this->results[] = new \App\Models\Result(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment