Fixed: (Flaresolverr) no longer pass userAgent to FlareSolverr

Specifying userAgent is no longer supported by Flaresolverr v2 (October
2021). It's been almost 1 year and half now and Flaresolverr is now in version 3.

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
pull/1519/head
Arthur Outhenin-Chalandre 2 years ago committed by Qstick
parent 88e5d34fcf
commit 2d216fac5d

@ -100,7 +100,6 @@ namespace NzbDrone.Core.IndexerProxies.FlareSolverr
FlareSolverrRequest req; FlareSolverrRequest req;
var url = request.Url.ToString(); var url = request.Url.ToString();
var userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36";
var maxTimeout = Settings.RequestTimeout * 1000; var maxTimeout = Settings.RequestTimeout * 1000;
// Use Proxy if no credentials are set (creds not supported as of FS 2.2.9) // Use Proxy if no credentials are set (creds not supported as of FS 2.2.9)
@ -114,7 +113,6 @@ namespace NzbDrone.Core.IndexerProxies.FlareSolverr
Cmd = "request.get", Cmd = "request.get",
Url = url, Url = url,
MaxTimeout = maxTimeout, MaxTimeout = maxTimeout,
UserAgent = userAgent,
Proxy = new FlareSolverrProxy Proxy = new FlareSolverrProxy
{ {
Url = proxyUrl?.AbsoluteUri Url = proxyUrl?.AbsoluteUri
@ -141,7 +139,6 @@ namespace NzbDrone.Core.IndexerProxies.FlareSolverr
ContentLength = null ContentLength = null
}, },
MaxTimeout = maxTimeout, MaxTimeout = maxTimeout,
UserAgent = userAgent,
Proxy = new FlareSolverrProxy Proxy = new FlareSolverrProxy
{ {
Url = proxyUrl?.AbsoluteUri Url = proxyUrl?.AbsoluteUri
@ -226,7 +223,6 @@ namespace NzbDrone.Core.IndexerProxies.FlareSolverr
{ {
public string Cmd { get; set; } public string Cmd { get; set; }
public string Url { get; set; } public string Url { get; set; }
public string UserAgent { get; set; }
public Cookie[] Cookies { get; set; } public Cookie[] Cookies { get; set; }
public FlareSolverrProxy Proxy { get; set; } public FlareSolverrProxy Proxy { get; set; }
} }

Loading…
Cancel
Save