From 0a19fe9c6efc72a2229b64df3756392b37148958 Mon Sep 17 00:00:00 2001 From: TheDevKiller Date: Sun, 11 Nov 2018 17:36:24 +0100 Subject: [PATCH] Fixed bug --- .gitignore | 1 + fetch.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4fbbddf..5b88e5c 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ Session.vim .netrwhist *~ +_map.html diff --git a/fetch.py b/fetch.py index 248bc95..e291857 100755 --- a/fetch.py +++ b/fetch.py @@ -31,9 +31,9 @@ def runfetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD18245 def dms2dd(dms): coordslst = re.search("(\d{1,3})° (\d{2})(?:'|′) (\d{2}(?:,|.)?\d{0,3})(?:\"|”|\'\') ?(.)", dms).groups() dd = float(coordslst[0].replace(",", ".")) + float(coordslst[1].replace(",", "."))/60 + float(coordslst[2].replace(",", "."))/3600 - if coordslst[3] in ["N", "E"]: + if coordslst[3] in ["n", "e"]: return dd - elif coordslst[3] in ["S", "O"]: + if coordslst[3] in ["s", "o"]: return -dd @@ -91,7 +91,7 @@ def fetch(url='https://www.legifrance.gouv.fr/eli/arrete/2018/10/12/PRMD1824595A del lst # Atolls elif area["zone"].strip() == "atolls et eaux territoriales incluses": - area["zone"] = [("cercle", 3500.0, "138.9022", "21.82917"), ("cercle", "27KM", "138.7425", "22.23528A")] + area["zone"] = [("cercle", 3500.0, "138.9022", "21.82917"), ("cercle", "27KM", "138.7425", "22.23528")] return diclist