From b1c72ec4e70f3f20b4fefd41aa948b4bb5c54dad Mon Sep 17 00:00:00 2001 From: stud203799 Date: Sat, 2 May 2026 12:59:44 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B0=D0=B9=D0=BB=20=D0=BE=D1=82=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D1=8F=D1=8E=D1=89=D0=B8=D0=B9=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BF=D1=80=D0=BE=D1=81=20=D0=BA=20API=20Gitea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- token_read.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 token_read.py diff --git a/token_read.py b/token_read.py new file mode 100644 index 0000000..6618f62 --- /dev/null +++ b/token_read.py @@ -0,0 +1,10 @@ +import requests + +f = open("tokens.txt", 'r+') +for i in f: + if "readtok" in i: + for j in i: + TOKEN = i[i.index('-') + 2: -1] +headers = {"Authorization": f"token {TOKEN}"} +response = requests.get("https://git.vyatsu.ru/api/v1/user", headers=headers) +print(response.json()) \ No newline at end of file