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
47fde6de
Commit
47fde6de
authored
Feb 24, 2017
by
Dominik Hebeler
Browse files
Fehler in Yandex behoben
parent
1547be1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Yandex.php
View file @
47fde6de
...
...
@@ -44,8 +44,7 @@ class Yandex extends Searchengine
);
}
}
catch
(
\
Exception
$e
)
{
Log
::
error
(
"A problem occurred parsing results from
$this->name
:"
);
Log
::
error
(
$e
->
getMessage
());
Log
::
error
(
"A problem occurred parsing results from
$this->name
:
\n
"
.
$e
->
getMessage
()
.
"
\n
"
.
$result
);
return
;
}
}
...
...
@@ -58,8 +57,11 @@ class Yandex extends Searchengine
if
(
!
$content
)
{
return
;
}
$resultCount
=
intval
(
$content
->
xpath
(
'//yandexsearch/response/results/grouping/found[@priority="all"]'
)[
0
]
->
__toString
());
$resultCount
=
$content
->
xpath
(
'//yandexsearch/response/results/grouping/found[@priority="all"]'
);
if
(
!
$resultCount
||
sizeof
(
$resultCount
)
<=
0
){
return
;
}
$resultCount
=
intval
(
$resultCount
[
0
]
->
__toString
());
$pageLast
=
$content
->
xpath
(
'//yandexsearch/response/results/grouping/page'
)[
0
];
$pageLast
=
intval
(
$pageLast
[
"last"
]
->
__toString
());
if
(
count
(
$this
->
results
)
<=
0
||
$pageLast
>=
$resultCount
)
{
...
...
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