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
3bc11d90
Commit
3bc11d90
authored
2 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
logging failed yahoo searches
parent
ff6d9921
No related branches found
Branches containing commit
No related tags found
3 merge requests
!2027
Development
,
!2026
Development
,
!2025
Resolve "Fix Yahoo results for non monetized queries"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
metager/app/Models/parserSkripte/Overture.php
+17
-0
17 additions, 0 deletions
metager/app/Models/parserSkripte/Overture.php
with
17 additions
and
0 deletions
metager/app/Models/parserSkripte/Overture.php
+
17
−
0
View file @
3bc11d90
...
...
@@ -43,6 +43,7 @@ class Overture extends Searchengine
// There are cases where Yahoo will return empty responses
// when search terms are not monetized although websearch results should exist
$this
->
failed_results
=
true
;
$this
->
log_failed_yahoo_search
();
return
;
}
...
...
@@ -168,4 +169,20 @@ class Overture extends Searchengine
return
"&affilData="
.
$affilDataValue
.
"&serveUrl="
.
$serveUrl
;
}
private
function
log_failed_yahoo_search
()
{
$log_file
=
storage_path
(
"logs/metager/yahoo_fail.csv"
);
$data
=
[
"time"
=>
now
()
->
format
(
"Y-m-d H:i:s"
),
"query"
=>
$this
->
query
];
$fh
=
fopen
(
$log_file
,
"a"
);
try
{
fputcsv
(
$fh
,
$data
);
}
finally
{
fclose
(
$fh
);
}
}
}
\ No newline at end of file
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