chore: it wasn't the build's fault, it was the env file LOL
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
eba9a44717
commit
ea490cd1f1
1 changed files with 7 additions and 12 deletions
|
|
@ -9,7 +9,6 @@ import argparse
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
import requests
|
import requests
|
||||||
import json
|
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
@ -32,23 +31,19 @@ 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 subDomainsRequest
|
return subDomainsJSON
|
||||||
|
|
||||||
|
|
||||||
def getCurrentIP():
|
def getCurrentIP():
|
||||||
rrsetList = getSubDomains().json()
|
rrsetList = []
|
||||||
|
for rrset in list(getSubDomains()):
|
||||||
|
rrsetList.append(rrset["records"][0])
|
||||||
|
|
||||||
rrsetList_json = json.loads(rrsetList)
|
value, count = Counter(rrsetList).most_common(1)[0]
|
||||||
|
|
||||||
for rrset in rrsetList_json:
|
return value
|
||||||
print(type(rrset), repr(rrset))
|
|
||||||
|
|
||||||
#rrsetList.append(rrset[0])
|
|
||||||
|
|
||||||
#value, count = Counter(rrsetList).most_common(1)[0]
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def filterRecords():
|
def filterRecords():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue