@@ -36,16 +36,19 @@ class Scopia extends Searchengine
$anzeigeLink=$link;
$descr=$result->description->__toString();
$this->counter++;
$this->results[]=new\App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->engine->{"display-name"},
$this->engine->homepage,
$this->counter
);
if(!$this->containsPornContent($title.$descr)){//see note at filtering method
$this->results[]=new\App\Models\Result(
$this->engine,
$title,
$link,
$anzeigeLink,
$descr,
$this->engine->{"display-name"},
$this->engine->homepage,
$this->counter
);
}
}
}catch(\Exception$e){
Log::error("A problem occurred parsing results from $this->name:");
...
...
@@ -54,6 +57,65 @@ class Scopia extends Searchengine
}
}
privatefunctioncontainsPornContent($text){
// Returns true if pornographic content is detected
// We noticed scopia often serving pornographic results for non-pornographic queries. After much deliberation we decided to filter pornographic results from scopia. Those will have to be supplied by other search engines.