diff --git a/snapchat_bots/bot.py b/snapchat_bots/bot.py index b7214dd..6b16d2f 100755 --- a/snapchat_bots/bot.py +++ b/snapchat_bots/bot.py @@ -164,6 +164,10 @@ def _make_request(self, path, data = None, method = 'POST', files = None): if data is None: data = {} + proxies = { + "http": HTTP_PROXIE + } + headers = { 'User-Agent': 'Snapchat/8.1.1 (iPhone5,1; iOS 8.1.3; gzip)', 'Accept-Language': 'en-US;q=1, en;q=0.9', @@ -175,8 +179,8 @@ def _make_request(self, path, data = None, method = 'POST', files = None): if method == 'POST': data['timestamp'] = now data['req_token'] = make_request_token(self.auth_token, str(now)) - resp = requests.post(BASE_URL + path, data = data, files = files, headers = headers) + resp = requests.post(BASE_URL + path, data = data, files = files, headers = headers, proxies = proxies) else: - resp = requests.get(BASE_URL + path, params = data, headers = headers) + resp = requests.get(BASE_URL + path, params = data, headers = headers, proxies = proxies) return resp