|
@@ -96,12 +96,12 @@ class DataEmployee:
|
|
|
def get_data_from_api(self):
|
|
|
data = []
|
|
|
for link_api in self.create_links_api():
|
|
|
- response = requests.get(link_api)
|
|
|
- try:
|
|
|
- data.append(json.loads(response.text))
|
|
|
- except json.decoder.JSONDecodeError:
|
|
|
- response.encoding = 'utf-8-sig'
|
|
|
- data.append(json.loads(response.text))
|
|
|
+ response = requests.get(link_api)
|
|
|
+ try:
|
|
|
+ data.append(json.loads(response.text))
|
|
|
+ except json.decoder.JSONDecodeError:
|
|
|
+ response.encoding = 'utf-8-sig'
|
|
|
+ data.append(json.loads(response.text))
|
|
|
|
|
|
return data
|
|
|
|