mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Finish web UI for submitting spots. Closes #29
This commit is contained in:
@@ -96,10 +96,10 @@ class LookupHelper:
|
||||
try:
|
||||
logging.info("Downloading Clublog cty.xml...")
|
||||
response = self.CLUBLOG_CTY_XML_CACHE.get("https://cdn.clublog.org/cty.php?api=" + self.CLUBLOG_API_KEY,
|
||||
headers=HTTP_HEADERS).raw
|
||||
with gzip.GzipFile(fileobj=response) as uncompressed:
|
||||
headers=HTTP_HEADERS)
|
||||
open(self.CLUBLOG_XML_DOWNLOAD_LOCATION + ".gz", 'wb').write(response.content)
|
||||
with gzip.open(self.CLUBLOG_XML_DOWNLOAD_LOCATION + ".gz", "rb") as uncompressed:
|
||||
file_content = uncompressed.read()
|
||||
|
||||
with open(self.CLUBLOG_XML_DOWNLOAD_LOCATION, "wb") as f:
|
||||
f.write(file_content)
|
||||
f.flush()
|
||||
|
||||
Reference in New Issue
Block a user