diff options
Diffstat (limited to 'ingrex/intel.py')
-rwxr-xr-x | ingrex/intel.py | 6 |
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 @@ | |||
2 | import requests | 2 | import requests |
3 | import re | 3 | import re |
4 | import json | 4 | import json |
5 | import os | 5 | |
6 | 6 | ||
7 | class Intel(object): | 7 | class 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 | |||
135 | class IntelError(BaseException): | 136 | class IntelError(BaseException): |
136 | """Intel Error""" | 137 | """Intel Error""" |
137 | pass | 138 | pass |
138 | 139 | ||
140 | |||
139 | class CookieError(IntelError): | 141 | class CookieError(IntelError): |
140 | """Intel Error""" | 142 | """Intel Error""" |
141 | pass | 143 | pass |