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
089b332d
Commit
089b332d
authored
Jan 30, 2020
by
Dominik Hebeler
Browse files
Merge branch '926-use-a-proxy' into 'development'
Resolve "Use a proxy" Closes
#926
See merge request
!1496
parents
fe83a72e
050a6582
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/Console/Commands/RequestFetcher.php
View file @
089b332d
...
...
@@ -157,7 +157,7 @@ class RequestFetcher extends Command
curl_setopt
(
$ch
,
CURLOPT_PROXY
,
$this
->
proxyhost
);
curl_setopt
(
$ch
,
CURLOPT_PROXYUSERPWD
,
$this
->
proxyuser
.
":"
.
$this
->
proxypassword
);
curl_setopt
(
$ch
,
CURLOPT_PROXYPORT
,
$this
->
proxyport
);
curl_setopt
(
$ch
,
CURLOPT_PROXYTYPE
,
CURLPROXY_
SOCKS5
);
curl_setopt
(
$ch
,
CURLOPT_PROXYTYPE
,
CURLPROXY_
HTTP
);
}
if
(
!
empty
(
$job
[
"username"
])
&&
!
empty
(
$job
[
"password"
]))
{
...
...
app/Models/parserSkripte/Qualigo.php
View file @
089b332d
...
...
@@ -14,23 +14,29 @@ class Qualigo extends XmlSearchengine
protected
function
loadXmlResults
(
$resultsXml
)
{
$results
=
$resultsXml
->
xpath
(
'//RL/RANK'
);
foreach
(
$results
as
$result
)
{
$title
=
$result
->
{
"TITLE"
}
->
__toString
();
$link
=
$result
->
{
"URL"
}
->
__toString
();
$anzeigeLink
=
$result
->
{
"ORIGURL"
}
->
__toString
();
$descr
=
$result
->
{
"ABSTRACT"
}
->
__toString
();
$this
->
counter
++
;
$this
->
ads
[]
=
new
\
App\Models\Result
(
$this
->
engine
,
$title
,
$link
,
$anzeigeLink
,
$descr
,
$this
->
engine
->
{
"display-name"
},
$this
->
engine
->
homepage
,
$this
->
counter
);
try
{
$results
=
$resultsXml
->
xpath
(
'//RL/RANK'
);
foreach
(
$results
as
$result
)
{
$title
=
$result
->
{
"TITLE"
}
->
__toString
();
$link
=
$result
->
{
"URL"
}
->
__toString
();
$anzeigeLink
=
$result
->
{
"ORIGURL"
}
->
__toString
();
$descr
=
$result
->
{
"ABSTRACT"
}
->
__toString
();
$this
->
counter
++
;
$this
->
ads
[]
=
new
\
App\Models\Result
(
$this
->
engine
,
$title
,
$link
,
$anzeigeLink
,
$descr
,
$this
->
engine
->
{
"display-name"
},
$this
->
engine
->
homepage
,
$this
->
counter
);
}
}
catch
(
\
Exception
$e
)
{
Log
::
error
(
"A problem occurred parsing results from
$this->name
:"
);
Log
::
error
(
$e
->
getMessage
());
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