Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -237,7 +237,6 @@ def datavisualisation_skills_context(df, template, paper_bgcolor, plot_bgcolor,
|
|
237 |
def datavisualisation_chiffres_cles_emplois(url):
|
238 |
response = requests.get(url)
|
239 |
soup = BeautifulSoup(response.text, "lxml")
|
240 |
-
print("Le code HTML est : " + str(soup))
|
241 |
alldemandeurs = ''
|
242 |
allsalaires = ''
|
243 |
alldifficultes = ''
|
@@ -245,14 +244,14 @@ def datavisualisation_chiffres_cles_emplois(url):
|
|
245 |
allentreprises = ''
|
246 |
allembauches = soup.select('p.population_category')
|
247 |
allnumembauchesfirst = soup.select('p.population_main-num.data')
|
|
|
|
|
248 |
if removeTags(allnumembauchesfirst[0]).find('\xa0') != -1:
|
249 |
allnumembauches = removeTags(allnumembauchesfirst[0]).split('\xa0')
|
250 |
allnumembauches = ''.join(allnumembauches)
|
251 |
allnumembauches = allnumembauches.replace(" ","").strip()
|
252 |
else:
|
253 |
allnumembauches = removeTags(allnumembauchesfirst[0]).replace(" ","").strip()
|
254 |
-
print("Embauches avec tableau" + str(removeTags(allnumembauchesfirst[0])))
|
255 |
-
print("Embauches sans tableau" + str(removeTags(allnumembauchesfirst)))
|
256 |
|
257 |
if removeTags(allnumembauchesfirst[1]).find('\xa0') != -1:
|
258 |
allnumoffres = removeTags(allnumembauchesfirst[1]).split('\xa0')
|
|
|
237 |
def datavisualisation_chiffres_cles_emplois(url):
|
238 |
response = requests.get(url)
|
239 |
soup = BeautifulSoup(response.text, "lxml")
|
|
|
240 |
alldemandeurs = ''
|
241 |
allsalaires = ''
|
242 |
alldifficultes = ''
|
|
|
244 |
allentreprises = ''
|
245 |
allembauches = soup.select('p.population_category')
|
246 |
allnumembauchesfirst = soup.select('p.population_main-num.data')
|
247 |
+
print("Embauches avec tableau" + str(allembauches))
|
248 |
+
print("Embauches sans tableau" + str(allnumembauchesfirst))
|
249 |
if removeTags(allnumembauchesfirst[0]).find('\xa0') != -1:
|
250 |
allnumembauches = removeTags(allnumembauchesfirst[0]).split('\xa0')
|
251 |
allnumembauches = ''.join(allnumembauches)
|
252 |
allnumembauches = allnumembauches.replace(" ","").strip()
|
253 |
else:
|
254 |
allnumembauches = removeTags(allnumembauchesfirst[0]).replace(" ","").strip()
|
|
|
|
|
255 |
|
256 |
if removeTags(allnumembauchesfirst[1]).find('\xa0') != -1:
|
257 |
allnumoffres = removeTags(allnumembauchesfirst[1]).split('\xa0')
|