From 6197d16d56c4dd2233ee9384cfbe4e07afe18e5a Mon Sep 17 00:00:00 2001 From: TheDevKiller Date: Sun, 11 Nov 2018 16:11:20 +0100 Subject: [PATCH] Fixed problem in km to m conversion (i'm very dumb) --- fetch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch.py b/fetch.py index 02e4a55..4b3c8dc 100755 --- a/fetch.py +++ b/fetch.py @@ -79,7 +79,7 @@ def fetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD1824595A lst = [[]] lst[0] = list(re.search(r"(.{6}) .{0,5}?(\d{1,3},?\d{0,2} ?.{1,2}) .{1,35} ?(\d{3}° \d{1,2}' \d{1,2}” .) ?\/ ?(\d{1,3}° \d{1,2}' \d{1,2}” .)", area["zone"], re.S).groups()) if "km" in lst[0][1]: - lst[0][1] = float(re.search("(\d*,?\d*).*", lst[0][1]).groups()[0].replace(",", "."))*100 + lst[0][1] = float(re.search("(\d*,?\d*).*", lst[0][1]).groups()[0].replace(",", "."))*1000 lst[0][2] = dms2dd(lst[0][2]) lst[0][3] = dms2dd(lst[0][3]) area["zone"] = lst