Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
ec1aca1a
Commit
ec1aca1a
authored
May 15, 2017
by
Dominik Hebeler
Browse files
Exalead Parser sollte nun wieder funktionieren.
parent
3b5a81ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Exalead.php
View file @
ec1aca1a
...
...
@@ -22,7 +22,6 @@ class Exalead extends Searchengine
if
(
!
$content
)
{
return
;
}
$results
=
$content
;
$prefix
=
""
;
$namespace
=
""
;
...
...
@@ -36,7 +35,7 @@ class Exalead extends Searchengine
}
$results
->
registerXPathNamespace
(
$prefix
,
$namespace
);
try
{
$results
=
$results
->
xpath
(
"//a:
searchResult
/a:it
em
"
);
$results
=
$results
->
xpath
(
"//a:
hits
/a:
H
it"
);
}
catch
(
\
ErrorException
$e
)
{
return
;
}
...
...
@@ -44,7 +43,7 @@ class Exalead extends Searchengine
try
{
$result
->
registerXPathNamespace
(
$prefix
,
$namespace
);
$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
;
$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
)
{
...
...
@@ -55,7 +54,6 @@ class Exalead extends Searchengine
}
else
{
$descr
=
$result
->
xpath
(
"a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']"
)[
0
]
->
__toString
();
}
$this
->
counter
++
;
$this
->
results
[]
=
new
\
App\Models\Result
(
$this
->
engine
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment