10 lines
291 B
Python
10 lines
291 B
Python
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()) |