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
7dbe8b1a
Commit
7dbe8b1a
authored
Aug 09, 2016
by
Dominik Hebeler
Browse files
Merge branch '177-such-cache' into 'development'
Ein Fehler in Exalead repariert Closes
#177
See merge request
!256
parents
af09d378
6a69daa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Exalead.php
View file @
7dbe8b1a
...
...
@@ -15,6 +15,7 @@ class Exalead extends Searchengine
public
function
loadResults
(
$result
)
{
# die($result);
$result
=
preg_replace
(
"/
\r\n
/si"
,
""
,
$result
);
try
{
$content
=
simplexml_load_string
(
$result
);
...
...
@@ -50,9 +51,15 @@ class Exalead extends Searchengine
$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
();
$anzeigeLink
=
$link
;
if
(
sizeOf
(
$result
->
xpath
(
"a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']"
))
===
0
)
$descr
=
""
;
else
$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
)
{
$tmp
=
$result
->
xpath
(
"a:metas/a:Meta[@name='summary']/a:MetaText[@name='value']"
);
foreach
(
$tmp
as
$el
)
{
$descr
.
=
strip_tags
(
$el
->
asXML
());
}
}
else
$descr
=
$result
->
xpath
(
"a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']"
)[
0
]
->
__toString
();
$this
->
counter
++
;
$this
->
results
[]
=
new
\
App\Models\Result
(
...
...
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