test: testing for indexing lists or JSON outputs
All checks were successful
forgejo/scripts/pipeline/head This commit looks good
All checks were successful
forgejo/scripts/pipeline/head This commit looks good
This commit is contained in:
parent
5494b7e273
commit
0c85699935
1 changed files with 4 additions and 1 deletions
|
|
@ -33,12 +33,15 @@ def getSubDomains():
|
||||||
subDomainsRequest = requests.get(subDomainsLink, headers=subDomainsHeader)
|
subDomainsRequest = requests.get(subDomainsLink, headers=subDomainsHeader)
|
||||||
subDomainsJSON = subDomainsRequest.json()
|
subDomainsJSON = subDomainsRequest.json()
|
||||||
|
|
||||||
|
print(type(subDomainsJSON))
|
||||||
|
|
||||||
return subDomainsJSON
|
return subDomainsJSON
|
||||||
|
|
||||||
|
|
||||||
def getCurrentIP():
|
def getCurrentIP():
|
||||||
rrsetList = []
|
rrsetList = []
|
||||||
for rrset in getSubDomains():
|
for rrset in list(getSubDomains()):
|
||||||
|
print(rrset)
|
||||||
rrsetList.append(rrset["records"][0])
|
rrsetList.append(rrset["records"][0])
|
||||||
|
|
||||||
value, count = Counter(rrsetList).most_common(1)[0]
|
value, count = Counter(rrsetList).most_common(1)[0]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue