BREAKING CHANGE: checking json() functionality
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
5c47f8cffb
commit
eca336bff9
1 changed files with 5 additions and 5 deletions
|
|
@ -31,16 +31,16 @@ def getSubDomains():
|
||||||
subDomainsHeader = {"Authorization": "Token " + DESEC_TOKEN}
|
subDomainsHeader = {"Authorization": "Token " + DESEC_TOKEN}
|
||||||
|
|
||||||
subDomainsRequest = requests.get(subDomainsLink, headers=subDomainsHeader)
|
subDomainsRequest = requests.get(subDomainsLink, headers=subDomainsHeader)
|
||||||
subDomainsJSON = subDomainsRequest.json()
|
|
||||||
|
|
||||||
return subDomainsJSON
|
return subDomainsRequest
|
||||||
|
|
||||||
|
|
||||||
def getCurrentIP():
|
def getCurrentIP():
|
||||||
rrsetList = list(getSubDomains())
|
rrsetList = getSubDomains().json()
|
||||||
|
|
||||||
for rrset in rrsetList:
|
rrsets = [rrset["records"][0] for rrset in rrsetList]
|
||||||
print(rrset.get("records", [])[0])
|
|
||||||
|
print(rrsets)
|
||||||
|
|
||||||
#rrsetList.append(rrset[0])
|
#rrsetList.append(rrset[0])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue