File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class API(object):
27
27
# defaults for the API class
28
28
_timeout = 25 # second
29
29
_endpoint = "https://overpass-api.de/api/interpreter"
30
+ _headers = {"Accept-Charset" : "utf-8;q=0.7,*;q=0.7" }
30
31
_debug = False
31
32
_proxies = None
32
33
@@ -35,6 +36,7 @@ class API(object):
35
36
36
37
def __init__ (self , * args , ** kwargs ):
37
38
self .endpoint = kwargs .get ("endpoint" , self ._endpoint )
39
+ self .headers = kwargs .get ("headers" , self ._headers )
38
40
self .timeout = kwargs .get ("timeout" , self ._timeout )
39
41
self .debug = kwargs .get ("debug" , self ._debug )
40
42
self .proxies = kwargs .get ("proxies" , self ._proxies )
@@ -141,7 +143,7 @@ def _get_from_overpass(self, query):
141
143
data = payload ,
142
144
timeout = self .timeout ,
143
145
proxies = self .proxies ,
144
- headers = { "Accept-Charset" : "utf-8;q=0.7,*;q=0.7" } ,
146
+ headers = self . headers ,
145
147
)
146
148
147
149
except requests .exceptions .Timeout :
You can’t perform that action at this time.
0 commit comments