up planing familal properties
This commit is contained in:
parent
e6a14ba84d
commit
61098395e1
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,12 @@ antennes = []
|
||||
for article in articles:
|
||||
titre = article.find("button", class_="nsb action-title").text.strip()
|
||||
adresse = article.find("p", class_="address").text.strip()
|
||||
website = article.find("a", class_="icon arrow").get("href").strip()
|
||||
violences = article.find("li", class_="icon violences")
|
||||
sexualities = article.find("li", class_="icon sexualities")
|
||||
detection = article.find("li", class_="icon detection")
|
||||
contraception = article.find("li", class_="icon contraception")
|
||||
abortion = article.find("li", class_="icon abortion")
|
||||
|
||||
# Gérer les articles qui n'ont pas de numéro de téléphone
|
||||
telephone = ""
|
||||
@ -35,16 +41,18 @@ for article in articles:
|
||||
antenne = {
|
||||
"type": "Feature",
|
||||
"geometry":geometry,
|
||||
"properties": {
|
||||
"nom": titre,
|
||||
"adresse": adresse,
|
||||
"telephone": telephone
|
||||
},
|
||||
|
||||
"contact:phone": telephone,
|
||||
"contact:website": 'https://www.planning-familial.org/fr/'+website,
|
||||
"family_planning:handles:violences": ('yes' if violences else 'no'),
|
||||
"family_planning:handles:sexualities": ('yes' if sexualities else 'no'),
|
||||
"family_planning:handles:detection": ('yes' if detection else 'no'),
|
||||
"family_planning:handles:abortion": ('yes' if abortion else 'no'),
|
||||
"family_planning:handles:contraception": ('yes' if contraception else 'no'),
|
||||
}
|
||||
|
||||
|
||||
print(antenne)
|
||||
# print(antenne)
|
||||
|
||||
antennes.append(antenne)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user