Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

Commit 5230deb

Browse files
committed
Fix timestamp update for non-US domains in geotagger
Moved the assignment of current_time to only occur when processing non-US domains, ensuring LAST_CHECK is updated appropriately. Added a clarifying comment in update_auto_us_domains.
1 parent abedf58 commit 5230deb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Tool-13-Geolocation-Tagger.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ def update_auto_us_domains(accounts):
9696
for account_id, details in accounts.items():
9797
final_url_domain = details.get("FINAL_URL_DOMAIN", "")
9898
if final_url_domain in AUTO_US_DOMAINS:
99+
# Only update if we're actually processing this domain
99100
accounts[account_id]["SUSPECTED_REGION_OF_ORIGIN"] = "US"
100101
accounts[account_id]["LAST_CHECK"] = current_time
101102
updated_count += 1
@@ -129,10 +130,10 @@ def update_compromised_accounts(start_from=0):
129130
if i < start_from:
130131
continue
131132

132-
current_time = datetime.utcnow().isoformat()
133133
final_url_domain = details.get("FINAL_URL_DOMAIN", "")
134134

135135
if final_url_domain and final_url_domain not in AUTO_US_DOMAINS:
136+
current_time = datetime.utcnow().isoformat()
136137
country = get_geolocation(final_url_domain)
137138
accounts[account_id]["SUSPECTED_REGION_OF_ORIGIN"] = country
138139
accounts[account_id]["LAST_CHECK"] = current_time

0 commit comments

Comments
 (0)