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
3693648d
Commit
3693648d
authored
Sep 07, 2016
by
Dominik Hebeler
Browse files
Yandex dürfte nur noch so lange weitersuchen, wie es auch neue Ergebnisse hat
parent
7e648795
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Models/parserSkripte/Yandex.php
View file @
3693648d
...
...
@@ -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
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