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
050a6582
Commit
050a6582
authored
Jan 28, 2020
by
Dominik Hebeler
Browse files
try catch for qualigo
parent
ddce258b
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Qualigo.php
View file @
050a6582
...
...
@@ -14,23 +14,29 @@ class Qualigo extends XmlSearchengine
protected
function
loadXmlResults
(
$resultsXml
)
{
$results
=
$resultsXml
->
xpath
(
'//RL/RANK'
);
foreach
(
$results
as
$result
)
{
$title
=
$result
->
{
"TITLE"
}
->
__toString
();
$link
=
$result
->
{
"URL"
}
->
__toString
();
$anzeigeLink
=
$result
->
{
"ORIGURL"
}
->
__toString
();
$descr
=
$result
->
{
"ABSTRACT"
}
->
__toString
();
$this
->
counter
++
;
$this
->
ads
[]
=
new
\
App\Models\Result
(
$this
->
engine
,
$title
,
$link
,
$anzeigeLink
,
$descr
,
$this
->
engine
->
{
"display-name"
},
$this
->
engine
->
homepage
,
$this
->
counter
);
try
{
$results
=
$resultsXml
->
xpath
(
'//RL/RANK'
);
foreach
(
$results
as
$result
)
{
$title
=
$result
->
{
"TITLE"
}
->
__toString
();
$link
=
$result
->
{
"URL"
}
->
__toString
();
$anzeigeLink
=
$result
->
{
"ORIGURL"
}
->
__toString
();
$descr
=
$result
->
{
"ABSTRACT"
}
->
__toString
();
$this
->
counter
++
;
$this
->
ads
[]
=
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
:"
);
Log
::
error
(
$e
->
getMessage
());
return
;
}
}
...
...
Write
Preview
Markdown
is supported
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