aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ingrex/intel.py')
-rwxr-xr-xingrex/intel.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ingrex/intel.py b/ingrex/intel.py
index f13b2a2..506c6bc 100755
--- a/ingrex/intel.py
+++ b/ingrex/intel.py
@@ -2,7 +2,7 @@
2import requests 2import requests
3import re 3import re
4import json 4import json
5import os 5
6 6
7class Intel(object): 7class Intel(object):
8 "main class with all Intel functions" 8 "main class with all Intel functions"
@@ -43,7 +43,7 @@ class Intel(object):
43 count = 0 43 count = 0
44 while count < 3: 44 while count < 3:
45 try: 45 try:
46 request = self.session.post(url, data=json.dumps(payload), headers=self.headers) 46 request = self.session.post(url, data=json.dumps(payload), headers=self.headers, timeout=600)
47 return request.json()['result'] 47 return request.json()['result']
48 except requests.ConnectionError: 48 except requests.ConnectionError:
49 raise IntelError 49 raise IntelError
@@ -132,10 +132,12 @@ class Intel(object):
132 } 132 }
133 return self.fetch(url, payload) 133 return self.fetch(url, payload)
134 134
135
135class IntelError(BaseException): 136class IntelError(BaseException):
136 """Intel Error""" 137 """Intel Error"""
137 pass 138 pass
138 139
140
139class CookieError(IntelError): 141class CookieError(IntelError):
140 """Intel Error""" 142 """Intel Error"""
141 pass 143 pass
Powered by cgit v1.2.3 (git 2.41.0)