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
0c7e80b3
Commit
0c7e80b3
authored
Sep 07, 2016
by
Dominik Hebeler
Browse files
Yandex dürfte nur noch so lange weitersuchen, wie es auch neue Ergebnisse hat
parent
711bbac4
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Yandex.php
View file @
0c7e80b3
...
...
@@ -54,7 +54,17 @@ class Yandex extends Searchengine
public
function
getNext
(
\
App\MetaGer
$metager
,
$result
)
{
if
(
count
(
$this
->
results
)
<=
0
)
{
# Wir müssen herausfinden, ob es überhaupt noch weitere Ergebnisse von Yandex gibt:
try
{
$content
=
simplexml_load_string
(
$result
);
$resultCount
=
intval
(
$content
->
xpath
(
'//yandexsearch/response/results/grouping/found[@priority="all"]'
)[
0
]
->
__toString
());
$pageLast
=
$content
->
xpath
(
'//yandexsearch/response/results/grouping/page'
)[
0
];
$pageLast
=
intval
(
$pageLast
[
"last"
]
->
__toString
());
}
catch
(
\
Exception
$e
)
{
return
;
}
if
(
count
(
$this
->
results
)
<=
0
||
$pageLast
>=
$resultCount
)
{
return
;
}
...
...
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