datacipen commited on
Commit
b62b8be
1 Parent(s): df6f7e1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -924,7 +924,7 @@ async def Metier_secteur_contexte_travail(codes):
924
  'client_secret': 'b968556f8b4bf2c42af42498304bab0d76edcef23ed4723bbd621ae317a6657e',
925
  'scope': 'api_rome-metiersv1'
926
  }
927
- r = requests.post("https://entreprise.francetravail.fr/connexion/oauth2/access_token?realm=/partenaire",
928
  headers={"Content-Type":"application/x-www-form-urlencoded"},
929
  data=payload)
930
 
@@ -932,7 +932,7 @@ async def Metier_secteur_contexte_travail(codes):
932
  load_json = json.loads(data)
933
 
934
  token = next(d['access_token'] for d in load_json if d['scope'] == 'api_rome-metiersv1')
935
- conn = http.client.HTTPSConnection("api.francetravail.io")
936
 
937
  headers = {
938
  'Authorization': "Bearer " + token,
@@ -963,14 +963,14 @@ async def Fiche_metier_competences_savoirs(codes):
963
  'client_secret': 'b968556f8b4bf2c42af42498304bab0d76edcef23ed4723bbd621ae317a6657e',
964
  'scope': 'api_rome-fiches-metiersv1'
965
  }
966
- r = requests.post("https://entreprise.francetravail.fr/connexion/oauth2/access_token?realm=/partenaire",
967
  headers={"Content-Type":"application/x-www-form-urlencoded"},
968
  data=payload)
969
 
970
  data = "[" + r.content.decode("utf-8") + "]"
971
  load_json = json.loads(data)
972
  token = next(d['access_token'] for d in load_json if d['scope'] == 'api_rome-fiches-metiersv1')
973
- conn = http.client.HTTPSConnection("api.francetravail.io")
974
 
975
  headers = {
976
  'Authorization': "Bearer " + token,
 
924
  'client_secret': 'b968556f8b4bf2c42af42498304bab0d76edcef23ed4723bbd621ae317a6657e',
925
  'scope': 'api_rome-metiersv1'
926
  }
927
+ r = requests.post("https://entreprise.pole-emploi.fr/connexion/oauth2/access_token?realm=/partenaire",
928
  headers={"Content-Type":"application/x-www-form-urlencoded"},
929
  data=payload)
930
 
 
932
  load_json = json.loads(data)
933
 
934
  token = next(d['access_token'] for d in load_json if d['scope'] == 'api_rome-metiersv1')
935
+ conn = http.client.HTTPSConnection("api.pole-emploi.io")
936
 
937
  headers = {
938
  'Authorization': "Bearer " + token,
 
963
  'client_secret': 'b968556f8b4bf2c42af42498304bab0d76edcef23ed4723bbd621ae317a6657e',
964
  'scope': 'api_rome-fiches-metiersv1'
965
  }
966
+ r = requests.post("https://entreprise.pole-emploi.fr/connexion/oauth2/access_token?realm=/partenaire",
967
  headers={"Content-Type":"application/x-www-form-urlencoded"},
968
  data=payload)
969
 
970
  data = "[" + r.content.decode("utf-8") + "]"
971
  load_json = json.loads(data)
972
  token = next(d['access_token'] for d in load_json if d['scope'] == 'api_rome-fiches-metiersv1')
973
+ conn = http.client.HTTPSConnection("api.pole-emploi.io")
974
 
975
  headers = {
976
  'Authorization': "Bearer " + token,