We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20474ca commit 34ec65cCopy full SHA for 34ec65c
tranco/tranco.py
@@ -2,7 +2,7 @@
2
from io import BytesIO
3
import requests
4
import os
5
-import sys
+import platform
6
import zipfile
7
8
VERSION = '0.7'
@@ -43,7 +43,7 @@ def __init__(self, **kwargs):
43
self.api_key = kwargs.get('api_key')
44
45
self.session = requests.Session()
46
- self.session.headers.update({'User-Agent': 'Python/{} python-requests/{} tranco-python/{}'.format(sys.version, requests.__version__, VERSION)})
+ self.session.headers.update({'User-Agent': 'Python/{} python-requests/{} tranco-python/{}'.format(platform.python_version(), requests.__version__, VERSION)})
47
48
def _cache_path(self, date):
49
return os.path.join(self.cache_dir, date + '-DEFAULT.csv')
0 commit comments