summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parsers/caves.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index 5c6b5ac..b376801 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -146,10 +146,13 @@ def create_new_cave(svxpath):
# double check
if a[0:3] == "162":
areanum = a[0:4]
- url = f"{areanum}/{a[5:]}.html" # Note we are appending the .html as we are believe in backwards compatability.
- else:
+ url = f"{areanum}/{caveid}.html" # Note we are appending the .html as we are believe in backwards compatability.
+ #url = f"{areanum}/{a[5:]}.html" # This is original code, but a above is only defined as being 4 characters long, so it did not make sense and produced non unique urls
+ else:
+ print(f"WARNING: parsers/caves/create_new_cave called with svxpath '{svxpath}'. Surely it should start 'caves-162*'?")
areanum = "1623"
- url = f"1623/{k}.html"
+ url = f"1623/{caveid}.html"
+ #url = f"1623/{k}.html" # This is original code, but a above is only defined as being 4 characters long, so it did not make sense and produced non unique urls
k = f"{areanum}-{caveid}"
area = get_area(areanum)