diff --git a/edupage_api/__init__.py b/edupage_api/__init__.py index 0982f15..913bb41 100644 --- a/edupage_api/__init__.py +++ b/edupage_api/__init__.py @@ -1,5 +1,6 @@ from datetime import date import requests, json, datetime +import pprint from edupage_api.utils import * from edupage_api.date import * @@ -107,13 +108,17 @@ def get_homework(self): for item in items: if not item.get("typ") == "homework": continue + title = item.get("user_meno") data = json.loads(item.get("data")) if data == None: - print(item) + continue + + if data.get("triedaid") == None: + continue due_date = data.get("date") @@ -122,6 +127,9 @@ def get_homework(self): event_id = data.get("superid") + print("________________________________") + print(data.get("triedaid")) + class_name = ids.id_to_class(data.get("triedaid")) subject = ids.id_to_subject(data.get("predmetid"))