MCPcopy Create free account
hub / github.com/adobe/Marinus / fetch_domain

Function fetch_domain

python3_cron_scripts/download_facebook_certs.py:81–109  ·  view source on GitHub ↗

Fetch the results for the specified zone.

(logger, jobs_manager, fbc, access_token, zone)

Source from the content-addressed store, hash-verified

79
80
81def fetch_domain(logger, jobs_manager, fbc, access_token, zone):
82 """
83 Fetch the results for the specified zone.
84 """
85 fb_url = (
86 (fbc.BASE_URL + fbc.VERSION + "/certificates?query=")
87 + zone
88 + ("&access_token=" + access_token + "&limit=500" + "")
89 )
90 # "&fields=cert_hash_sha256,domains,issuer_name,certificate_pem"
91
92 cert_results = []
93
94 while fb_url is not None:
95 result = make_https_request(logger, jobs_manager, fb_url)
96
97 if result is None:
98 logger.warning("Error querying: " + zone)
99 return None
100
101 cert_results = cert_results + result["data"]
102
103 try:
104 paging = result["paging"]
105 fb_url = paging["next"]
106 except:
107 fb_url = None
108
109 return cert_results
110
111
112def check_save_location(storage_manager, save_location):

Callers 1

mainFunction · 0.85

Calls 1

make_https_requestFunction · 0.70

Tested by

no test coverage detected