файл отправляющий запрос к API Gitea

This commit is contained in:
Максим Гетман 2026-05-02 12:59:44 +03:00
parent 010d5a0e77
commit b1c72ec4e7

10
token_read.py Normal file
View File

@ -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())