Skip to content
GitLab
Menu
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
fc1f12ba
Commit
fc1f12ba
authored
Jul 26, 2016
by
Dominik Hebeler
Browse files
Merge branch 'Bugfix' into 'development'
Bugfix See merge request
!183
parents
71625146
35d49e9f
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Exalead.php
View file @
fc1f12ba
...
...
@@ -45,24 +45,29 @@ class Exalead extends Searchengine
}
foreach
(
$results
as
$result
)
{
$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
();
$anzeigeLink
=
$link
;
if
(
sizeOf
(
$result
->
xpath
(
"a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']"
))
===
0
)
$descr
=
""
;
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
,
$title
,
$link
,
$anzeigeLink
,
$descr
,
$this
->
gefVon
,
$this
->
counter
);
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
();
$anzeigeLink
=
$link
;
if
(
sizeOf
(
$result
->
xpath
(
"a:metas/a:Meta[@name='metadesc']/a:MetaString[@name='value']"
))
===
0
)
$descr
=
""
;
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
,
$title
,
$link
,
$anzeigeLink
,
$descr
,
$this
->
gefVon
,
$this
->
counter
);
}
catch
(
\
ErrorException
$e
)
{
continue
;
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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