Commit ec1aca1a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Exalead Parser sollte nun wieder funktionieren.

parent 3b5a81ee
...@@ -22,7 +22,6 @@ class Exalead extends Searchengine ...@@ -22,7 +22,6 @@ class Exalead extends Searchengine
if (!$content) { if (!$content) {
return; return;
} }
$results = $content; $results = $content;
$prefix = ""; $prefix = "";
$namespace = ""; $namespace = "";
...@@ -36,7 +35,7 @@ class Exalead extends Searchengine ...@@ -36,7 +35,7 @@ class Exalead extends Searchengine
} }
$results->registerXPathNamespace($prefix, $namespace); $results->registerXPathNamespace($prefix, $namespace);
try { try {
$results = $results->xpath("//a:searchResult/a:item"); $results = $results->xpath("//a:hits/a:Hit");
} catch (\ErrorException $e) { } catch (\ErrorException $e) {
return; return;
} }
...@@ -44,7 +43,7 @@ class Exalead extends Searchengine ...@@ -44,7 +43,7 @@ class Exalead extends Searchengine
try { try {
$result->registerXPathNamespace($prefix, $namespace); $result->registerXPathNamespace($prefix, $namespace);
$title = $result->xpath("a:metas/a:Meta[@name='title']/a:MetaString[@name='value']")[0]->__toString(); $title = $result->xpath("a:metas/a:Meta[@name='title']/a:MetaString[@name='value']")[0]->__toString();
$link = $result->xpath("a:metas/a:Meta[@name='url']/a:MetaString[@name='value']")[0]->__toString(); $link = $result["url"]->__toString();
$anzeigeLink = $link; $anzeigeLink = $link;
$descr = ""; $descr = "";
if (sizeOf($result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")) === 0 && sizeOf($result->xpath("a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']")) !== 0) { if (sizeOf($result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")) === 0 && sizeOf($result->xpath("a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']")) !== 0) {
...@@ -55,7 +54,6 @@ class Exalead extends Searchengine ...@@ -55,7 +54,6 @@ class Exalead extends Searchengine
} else { } else {
$descr = $result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")[0]->__toString(); $descr = $result->xpath("a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']")[0]->__toString();
} }
$this->counter++; $this->counter++;
$this->results[] = new \App\Models\Result( $this->results[] = new \App\Models\Result(
$this->engine, $this->engine,
......
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