From b6da583684a3ab6cf617ff76a4b0a0495d331f76 Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Wed, 31 Jul 2024 10:05:40 +0200 Subject: [PATCH 1/3] [FIX] XN needs to be sent in ASCII --- atlas/atlascreator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/atlas/atlascreator.py b/atlas/atlascreator.py index 60878b0..f76402d 100644 --- a/atlas/atlascreator.py +++ b/atlas/atlascreator.py @@ -60,19 +60,19 @@ def webrequest(tld, stack): def dbwriter(unicodetld, stack, measurement): - tld = Atlas.objects.filter(unicodetld=unicodetld) + tld = Atlas.objects.filter(tld=tld) tldstack = tld.filter(stack=stack) if tldstack.exists(): primary_key = tldstack.values_list('pk', flat=True).first() db = Atlas.objects.get(pk=primary_key) else: db = Atlas() - db.unicodetld = unicodetld + db.tld = tld db.stack = stack if measurement is not None: db.measurement = measurement db.save() - tld = TLD.objects.filter(unicodetld=unicodetld) + tld = TLD.objects.filter(tld=tld) if tld.exists(): primary_key = tld.values_list('pk', flat=True).first() db = TLD.objects.get(pk=primary_key) @@ -93,8 +93,8 @@ def main(): tlds = TLD.objects.all().order_by('tld') for tld in tlds: db = TLD.objects.get(tld=tld) - unicodetlds.append(db.unicodetld) - for tld in unicodetlds: + tlds.append(db.tld) + for tld in tlds: db = TLD.objects.get(tld=tld) if db.atlasv4 is None: webrequest(tld, 4) From 59fcbf1cdaeac2bb3d44537cca2bcc354b11baf2 Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Wed, 31 Jul 2024 10:09:29 +0200 Subject: [PATCH 2/3] [FIX] Bad var name --- atlas/atlascreator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atlas/atlascreator.py b/atlas/atlascreator.py index f76402d..9d662d5 100644 --- a/atlas/atlascreator.py +++ b/atlas/atlascreator.py @@ -59,8 +59,8 @@ def webrequest(tld, stack): dbwriter(tld, stack, measurement) -def dbwriter(unicodetld, stack, measurement): - tld = Atlas.objects.filter(tld=tld) +def dbwriter(intld, stack, measurement): + tld = Atlas.objects.filter(tld=intld) tldstack = tld.filter(stack=stack) if tldstack.exists(): primary_key = tldstack.values_list('pk', flat=True).first() @@ -72,7 +72,7 @@ def dbwriter(unicodetld, stack, measurement): if measurement is not None: db.measurement = measurement db.save() - tld = TLD.objects.filter(tld=tld) + tld = TLD.objects.filter(tld=intld) if tld.exists(): primary_key = tld.values_list('pk', flat=True).first() db = TLD.objects.get(pk=primary_key) From f31742a8a3318ee88f67b597677e9706b72aaaff Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Wed, 31 Jul 2024 10:11:01 +0200 Subject: [PATCH 3/3] [FIX] list problem --- atlas/atlascreator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atlas/atlascreator.py b/atlas/atlascreator.py index 9d662d5..9938a56 100644 --- a/atlas/atlascreator.py +++ b/atlas/atlascreator.py @@ -67,7 +67,7 @@ def dbwriter(intld, stack, measurement): db = Atlas.objects.get(pk=primary_key) else: db = Atlas() - db.tld = tld + db.tld = intld db.stack = stack if measurement is not None: db.measurement = measurement @@ -88,13 +88,13 @@ def dbwriter(intld, stack, measurement): def main(): - unicodetlds = [] + tldslist = [] # This will get the TLD's in unicode format from the database and put them in the list tlds = TLD.objects.all().order_by('tld') for tld in tlds: db = TLD.objects.get(tld=tld) tlds.append(db.tld) - for tld in tlds: + for tld in tldslist: db = TLD.objects.get(tld=tld) if db.atlasv4 is None: webrequest(tld, 4)