Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
44092b3d
Commit
44092b3d
authored
7 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Plain Diff
Merge branch '496-yandex-phrasensuche' into 'development'
Automatische Korrektur von Yandex ignoriert Closes
#496
See merge request
!867
parents
8955234b
d66e9b3c
No related branches found
No related tags found
1 merge request
!1365
Resolve "Filter Options for MetaGer"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Models/parserSkripte/Yandex.php
+9
-0
9 additions, 0 deletions
app/Models/parserSkripte/Yandex.php
with
9 additions
and
0 deletions
app/Models/parserSkripte/Yandex.php
+
9
−
0
View file @
44092b3d
...
@@ -23,6 +23,15 @@ class Yandex extends Searchengine
...
@@ -23,6 +23,15 @@ class Yandex extends Searchengine
return
;
return
;
}
}
# let's check if the query got unquoted
# in that case we will ignore all results because that would mean
# a string search (query between "") was wished and no results for that foudn
$reask
=
$content
->
xpath
(
"//yandexsearch/response/reask"
);
if
(
sizeof
(
$reask
)
!==
0
&&
$reask
[
0
]
->
{
"rule"
}
->
__toString
()){
return
;
}
$results
=
$content
->
xpath
(
"//yandexsearch/response/results/grouping/group"
);
$results
=
$content
->
xpath
(
"//yandexsearch/response/results/grouping/group"
);
foreach
(
$results
as
$result
)
{
foreach
(
$results
as
$result
)
{
$title
=
strip_tags
(
$result
->
{
"doc"
}
->
{
"title"
}
->
asXML
());
$title
=
strip_tags
(
$result
->
{
"doc"
}
->
{
"title"
}
->
asXML
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment