Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -56,8 +56,10 @@ def listToString(list):
|
|
| 56 |
|
| 57 |
def arrayToString(array):
|
| 58 |
arrayList = []
|
|
|
|
| 59 |
for i in range(0,len(array)):
|
| 60 |
-
|
|
|
|
| 61 |
string = ', '.join(arrayList)
|
| 62 |
return string + '; '
|
| 63 |
|
|
@@ -294,7 +296,7 @@ async def setup_agent(settings):
|
|
| 294 |
if i == 0:
|
| 295 |
emplois.append("Secteur : " + searchByRome(romeListArray[0]) + " " + romeListArray[1])
|
| 296 |
else:
|
| 297 |
-
emplois.append("\nEmploi : " + results[i]['intitule'] + "; Contrat : " + results[i]['typeContrat'] + "; Compétences professionnelles : " + arrayToString(results[i]['competences']) if listToString(results[i]).find("'competences':")!=-1
|
| 298 |
emplois_list = ''.join(emplois)
|
| 299 |
context = emplois_list.replace('[','').replace(']','').replace('{','').replace('}','')
|
| 300 |
taskNCS1.status = cl.TaskStatus.DONE
|
|
|
|
| 56 |
|
| 57 |
def arrayToString(array):
|
| 58 |
arrayList = []
|
| 59 |
+
|
| 60 |
for i in range(0,len(array)):
|
| 61 |
+
if array[i].find("libelle")!=-1:
|
| 62 |
+
arrayList.append(array[i]['libelle'])
|
| 63 |
string = ', '.join(arrayList)
|
| 64 |
return string + '; '
|
| 65 |
|
|
|
|
| 296 |
if i == 0:
|
| 297 |
emplois.append("Secteur : " + searchByRome(romeListArray[0]) + " " + romeListArray[1])
|
| 298 |
else:
|
| 299 |
+
emplois.append("\nEmploi : " + results[i]['intitule'] + "; Contrat : " + results[i]['typeContrat'] + "; Compétences professionnelles : " + arrayToString(results[i]['competences']) if listToString(results[i]).find("'competences':")!=-1 else "; " + "Salaire : " + listToString(results[i]['salaire']) + "; Qualification : " + results[i]['qualificationLibelle'] if listToString(results[i]).find("'qualificationLibelle':")!=-1 else "; " + "; Localisation : " + listToString(results[i]['lieuTravail']) + "; Entreprise : " + listToString(results[i]['entreprise']['nom']) if listToString(results[i]['entreprise']).find("'nom':")!=-1 else "; ")
|
| 300 |
emplois_list = ''.join(emplois)
|
| 301 |
context = emplois_list.replace('[','').replace(']','').replace('{','').replace('}','')
|
| 302 |
taskNCS1.status = cl.TaskStatus.DONE
|