mirror of
https://github.com/sivel/speedtest-cli.git
synced 2026-08-04 14:49:36 +00:00
Fail to get_config
Add headers['Accept'] to prevent 403 error from speedtest server
This commit is contained in:
parent
22210ca352
commit
4a59db832b
1 changed files with 1 additions and 0 deletions
|
|
@ -1129,6 +1129,7 @@ class Speedtest(object):
|
|||
headers = {}
|
||||
if gzip:
|
||||
headers['Accept-Encoding'] = 'gzip'
|
||||
headers['Accept'] = 'text/html,application/xhtml+xml,application/xml'
|
||||
request = build_request('://www.speedtest.net/speedtest-config.php',
|
||||
headers=headers, secure=self._secure)
|
||||
uh, e = catch_request(request, opener=self._opener)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue