файл отправляющий запрос к API Gitea
This commit is contained in:
parent
010d5a0e77
commit
b1c72ec4e7
10
token_read.py
Normal file
10
token_read.py
Normal 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())
|
||||
Loading…
Reference in New Issue
Block a user