Merge pull request #11049 from Chocobo1/python

Update outdated strings
This commit is contained in:
Mike Tzou 2019-08-10 11:32:09 +08:00 committed by GitHub
commit 2f32b0962e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 7 deletions

View file

@ -50,8 +50,8 @@
#include "base/utils/misc.h"
#include "proxyconfigurationmanager.h"
// Spoof Firefox 38 user agent to avoid web server banning
const char DEFAULT_USER_AGENT[] = "Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0";
// Disguise as Firefox to avoid web server banning
const char DEFAULT_USER_AGENT[] = "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0";
namespace
{

View file

@ -2003,7 +2003,11 @@ void MainWindow::installPython()
{
setCursor(QCursor(Qt::WaitCursor));
// Download python
const QString installerURL = "https://www.python.org/ftp/python/3.6.6/python-3.6.6.exe";
#ifdef QBT_APP_64BIT
const QString installerURL = "https://www.python.org/ftp/python/3.7.4/python-3.7.4-amd64.exe";
#else
const QString installerURL = "https://www.python.org/ftp/python/3.7.4/python-3.7.4.exe";
#endif
Net::DownloadManager::instance()->download(
Net::DownloadRequest(installerURL).saveToFile(true)
, this, &MainWindow::pythonDownloadFinished);

View file

@ -1,4 +1,4 @@
#VERSION: 1.43
#VERSION: 1.44
# Author:
# Christophe DUMEZ (chris@qbittorrent.org)
@ -40,7 +40,7 @@ import tempfile
import urllib2
# Some sites blocks default python User-agent
user_agent = 'Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0'
user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0'
headers = {'User-Agent': user_agent}
# SOCKS5 Proxy support
if ("sock_proxy" in os.environ) and (len(os.environ["sock_proxy"].strip()) > 0):

View file

@ -1,4 +1,4 @@
#VERSION: 1.42
#VERSION: 1.43
# Author:
# Christophe DUMEZ (chris@qbittorrent.org)
@ -40,7 +40,7 @@ import urllib.parse
import urllib.request
# Some sites blocks default python User-agent
user_agent = 'Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0'
user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0'
headers = {'User-Agent': user_agent}
# SOCKS5 Proxy support
if "sock_proxy" in os.environ and len(os.environ["sock_proxy"].strip()) > 0: