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:
|
for area in diclist:
|
||||||
# Polygons
|
# Polygons
|
||||||
if "polygone" in area["zone"]:
|
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
|
area["zone"] = lst
|
||||||
print(lst)
|
print(lst)
|
||||||
del lst
|
del lst
|
||||||
@ -42,6 +42,7 @@ if __name__ == '__main__':
|
|||||||
# Print the dict (keep this code in the end of the file)
|
# Print the dict (keep this code in the end of the file)
|
||||||
print("===== Dict =====")
|
print("===== Dict =====")
|
||||||
for index, area in enumerate(diclist):
|
for index, area in enumerate(diclist):
|
||||||
print(f"\n-------------{index}----------------\n")
|
if index == 33:
|
||||||
for element in area:
|
print(f"\n-------------{index}----------------\n")
|
||||||
print(f" {element}: {diclist[index][element]}")
|
for element in area:
|
||||||
|
print(f" {element}: {diclist[index][element]}")
|
Loading…
Reference in New Issue
Block a user