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
a2b25791
Commit
a2b25791
authored
4 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Plain Diff
Merge branch 'development' into 'master'
Development See merge request
!1589
parents
8dfcfa12
0d18a426
No related branches found
No related tags found
3 merge requests
!1645
Development
,
!1641
Development
,
!1589
Development
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-0
1 addition, 0 deletions
.gitlab-ci.yml
app/Console/Commands/RequestFetcher.php
+2
-2
2 additions, 2 deletions
app/Console/Commands/RequestFetcher.php
app/Models/Searchengine.php
+3
-0
3 additions, 0 deletions
app/Models/Searchengine.php
with
6 additions
and
2 deletions
.gitlab-ci.yml
+
1
−
0
View file @
a2b25791
...
...
@@ -193,6 +193,7 @@ development:
-
$INCREMENTAL_ROLLOUT_ENABLED
-
$INCREMENTAL_ROLLOUT_MODE
production
:
variables
:
ADDITIONAL_HOSTS
:
"
www.metager.de,metager.org,www.metager.org,metager.es,www.metager.es,klassik.metager.org"
...
...
This diff is collapsed.
Click to expand it.
app/Console/Commands/RequestFetcher.php
+
2
−
2
View file @
a2b25791
...
...
@@ -180,12 +180,12 @@ class RequestFetcher extends Command
private
function
getCurlHandle
(
$job
)
{
$ch
=
curl_init
();
curl_setopt_array
(
$ch
,
array
(
CURLOPT_URL
=>
$job
[
"url"
],
CURLOPT_PRIVATE
=>
$job
[
"resulthash"
]
.
";"
.
$job
[
"cacheDuration"
],
CURLOPT_RETURNTRANSFER
=>
1
,
CURLOPT_USERAGENT
=>
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"
,
CURLOPT_USERAGENT
=>
$job
[
"useragent"
]
,
CURLOPT_FOLLOWLOCATION
=>
true
,
CURLOPT_CONNECTTIMEOUT
=>
2
,
CURLOPT_MAXCONNECTS
=>
500
,
...
...
This diff is collapsed.
Click to expand it.
app/Models/Searchengine.php
+
3
−
0
View file @
a2b25791
...
...
@@ -49,6 +49,8 @@ abstract class Searchengine
}
$this
->
cacheDuration
=
max
(
$this
->
cacheDuration
,
5
);
// Thanks to our Middleware this is a almost completely random useragent
// which matches the correct device type
$this
->
useragent
=
$metager
->
getUserAgent
();
$this
->
ip
=
$metager
->
getIp
();
$this
->
startTime
=
microtime
(
true
);
...
...
@@ -143,6 +145,7 @@ abstract class Searchengine
$mission
=
[
"resulthash"
=>
$this
->
hash
,
"url"
=>
$url
,
"useragent"
=>
$this
->
useragent
,
"username"
=>
$this
->
username
,
"password"
=>
$this
->
password
,
"headers"
=>
$this
->
headers
,
...
...
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