Merge pull request #94 from altf4arnold/xn
[FIX] XN needs to be sent in ASCII
This commit is contained in:
commit
df30c71a64
|
@ -59,20 +59,20 @@ def webrequest(tld, stack):
|
|||
dbwriter(tld, stack, measurement)
|
||||
|
||||
|
||||
def dbwriter(unicodetld, stack, measurement):
|
||||
tld = Atlas.objects.filter(unicodetld=unicodetld)
|
||||
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()
|
||||
db = Atlas.objects.get(pk=primary_key)
|
||||
else:
|
||||
db = Atlas()
|
||||
db.unicodetld = unicodetld
|
||||
db.tld = intld
|
||||
db.stack = stack
|
||||
if measurement is not None:
|
||||
db.measurement = measurement
|
||||
db.save()
|
||||
tld = TLD.objects.filter(unicodetld=unicodetld)
|
||||
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)
|
||||
|
@ -88,13 +88,13 @@ def dbwriter(unicodetld, 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)
|
||||
unicodetlds.append(db.unicodetld)
|
||||
for tld in unicodetlds:
|
||||
tlds.append(db.tld)
|
||||
for tld in tldslist:
|
||||
db = TLD.objects.get(tld=tld)
|
||||
if db.atlasv4 is None:
|
||||
webrequest(tld, 4)
|
||||
|
|
Loading…
Reference in a new issue