wulkanowy-web/app/API/student_data.py
2021-02-05 20:22:24 +01:00

13 lines
No EOL
380 B
Python

import json
import requests
from .generate_cookies import autogenerate_cookies
def get_student_data(register_id, students, oun, s):
cookies = autogenerate_cookies(students, s)
with open('app/API/headers.json') as f:
headers = json.load(f)
student_data = requests.post(f'{oun}/Uczen.mvc/Get', headers=headers, cookies=cookies)
return student_data.json()