|
@@ -98,10 +98,10 @@ class DataEmployee:
|
|
|
for link_api in self.create_links_api():
|
|
|
response = requests.get(link_api)
|
|
|
try:
|
|
|
- data.append(json.loads(response.text))
|
|
|
+ data.append(response.json())
|
|
|
except json.decoder.JSONDecodeError:
|
|
|
- response.encoding = 'utf-8-sig'
|
|
|
- data.append(json.loads(response.text))
|
|
|
+ result = str(response.text).encode('utf-8-sig').decode('utf-8-sig')
|
|
|
+ data.append(json.loads(result.encode('utf-8')))
|
|
|
|
|
|
return data
|
|
|
|