From a6831bb980d99b505cc89f2cf57b4d381188e4fb Mon Sep 17 00:00:00 2001 From: Andy Clemenko Date: Wed, 17 Apr 2024 15:56:19 -0400 Subject: [PATCH] fixing headers --- dzver/app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dzver/app.py b/dzver/app.py index 6136f89..3e35a35 100644 --- a/dzver/app.py +++ b/dzver/app.py @@ -43,22 +43,22 @@ def curl_all_the_things(): rke_data = json.loads(requests.get("https://update.rke2.io/v1-release/channels").text) rke_out = json.dumps(rke_data["data"][0]["latest"]).replace('"', '') - cert_data = json.loads(requests.get("https://api.github.com/repos/cert-manager/cert-manager/releases/latest").text) + cert_data = json.loads(requests.get("https://api.github.com/repos/cert-manager/cert-manager/releases/latest", headers=headers).text) cert_out = json.dumps(cert_data["tag_name"]).replace('"', '') - rancher_data = json.loads(requests.get("https://api.github.com/repos/rancher/rancher/releases/latest").text) + rancher_data = json.loads(requests.get("https://api.github.com/repos/rancher/rancher/releases/latest", headers=headers).text) rancher_out = json.dumps(rancher_data["tag_name"]).replace('"', '') - longhorn_data = json.loads(requests.get("https://api.github.com/repos/longhorn/longhorn/releases/latest").text) + longhorn_data = json.loads(requests.get("https://api.github.com/repos/longhorn/longhorn/releases/latest", headers=headers).text) longhorn_out = json.dumps(longhorn_data["tag_name"]).replace('"', '') - neuvector_data = json.loads(requests.get("https://api.github.com/repos/neuvector/neuvector/releases/latest").text) + neuvector_data = json.loads(requests.get("https://api.github.com/repos/neuvector/neuvector/releases/latest", headers=headers).text) neuvector_out = json.dumps(neuvector_data["tag_name"]).replace('"', '') - harvester_data = json.loads(requests.get("https://api.github.com/repos/harvester/harvester/releases/latest").text) + harvester_data = json.loads(requests.get("https://api.github.com/repos/harvester/harvester/releases/latest, headers=headers").text) harvester_out = json.dumps(harvester_data["tag_name"]).replace('"', '') - hauler_data = json.loads(requests.get("https://api.github.com/repos/rancherfederal/hauler/releases/latest").text) + hauler_data = json.loads(requests.get("https://api.github.com/repos/rancherfederal/hauler/releases/latest", headers=headers).text) hauler_out = json.dumps(hauler_data["tag_name"]).replace('"', '') k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text)