summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-11-11 22:08:48 -0800
committerFuwn <[email protected]>2024-11-11 22:08:48 -0800
commit2590d36f69ef55ce13f1699583a88f30969b172e (patch)
tree77ec020e8d07f7f92f7d975265313d121effbd03
parentfeat: optional logging (diff)
downloadami-2590d36f69ef55ce13f1699583a88f30969b172e.tar.xz
ami-2590d36f69ef55ce13f1699583a88f30969b172e.zip
refactor: move target cities variable into immediate use
-rw-r--r--ami.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/ami.py b/ami.py
index 3d510dd..334abbc 100644
--- a/ami.py
+++ b/ami.py
@@ -19,8 +19,6 @@ location = geolocator.geocode(environ.get("LOCATION"), addressdetails=True)
client.inject_token(environ.get("AUTHORIZATION"), "authorization")
-target_cities = environ.get("TARGET_CITIES") or ""
-
def log_response(data):
log = environ.get("LOG")
@@ -195,7 +193,7 @@ def print_job_table():
)
for job in json_api_data["data"]["searchJobCardsByLocation"]["jobCards"]:
- for city in target_cities.split(","):
+ for city in (environ.get("TARGET_CITIES") or "").split(","):
fixed_city = city.strip()
if job["city"].lower() == fixed_city.lower():