Made lists of tuples with the corners of the polygon
This commit is contained in:
parent
b3788fe34d
commit
e0a9819d3f
15
fetch.py
15
fetch.py
@ -30,9 +30,18 @@ if __name__ == '__main__':
|
|||||||
for index, zone in enumerate(diclist):
|
for index, zone in enumerate(diclist):
|
||||||
for element in zone:
|
for element in zone:
|
||||||
diclist[index][element] = re.sub("<br.{0,2}>", "\n", diclist[index][element]) # Replace <br>, <br /> and <br/> by \n
|
diclist[index][element] = re.sub("<br.{0,2}>", "\n", diclist[index][element]) # Replace <br>, <br /> and <br/> by \n
|
||||||
# Print the dict
|
# Make a the area
|
||||||
|
for area in diclist:
|
||||||
|
# Polygons
|
||||||
|
if "polygone" in area["zone"]:
|
||||||
|
lst = re.findall(".:(.*)\/(.*)", area["zone"])
|
||||||
|
area["zone"] = lst
|
||||||
|
print(lst)
|
||||||
|
del lst
|
||||||
|
|
||||||
|
# Print the dict (keep this code in the end of the file)
|
||||||
print("===== Dict =====")
|
print("===== Dict =====")
|
||||||
for index, zone in enumerate(diclist):
|
for index, area in enumerate(diclist):
|
||||||
print(f"\n-------------{index}----------------\n")
|
print(f"\n-------------{index}----------------\n")
|
||||||
for element in zone:
|
for element in area:
|
||||||
print(f" {element}: {diclist[index][element]}")
|
print(f" {element}: {diclist[index][element]}")
|
Loading…
Reference in New Issue
Block a user