Edited regex to match with polygons defined in one line
This commit is contained in:
parent
e0a9819d3f
commit
2e173546ef
9
fetch.py
9
fetch.py
@ -34,7 +34,7 @@ if __name__ == '__main__':
|
||||
for area in diclist:
|
||||
# Polygons
|
||||
if "polygone" in area["zone"]:
|
||||
lst = re.findall(".:(.*)\/(.*)", area["zone"])
|
||||
lst = re.findall(".{0,35} ?:? ?.? ?: ?(\d{3}° \d{2}' \d{2},?\d{0,2}” .) ?\/ ?(\d{2}° \d{2}' \d{2},?\d{0,2}” .)", area["zone"])
|
||||
area["zone"] = lst
|
||||
print(lst)
|
||||
del lst
|
||||
@ -42,6 +42,7 @@ if __name__ == '__main__':
|
||||
# Print the dict (keep this code in the end of the file)
|
||||
print("===== Dict =====")
|
||||
for index, area in enumerate(diclist):
|
||||
print(f"\n-------------{index}----------------\n")
|
||||
for element in area:
|
||||
print(f" {element}: {diclist[index][element]}")
|
||||
if index == 33:
|
||||
print(f"\n-------------{index}----------------\n")
|
||||
for element in area:
|
||||
print(f" {element}: {diclist[index][element]}")
|
Loading…
Reference in New Issue
Block a user