Skip to content

Commit

Permalink
fix homework
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanhrabcak committed Feb 19, 2021
1 parent 7273260 commit 8dbf542
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion edupage_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import date
import requests, json, datetime
import pprint

from edupage_api.utils import *
from edupage_api.date import *
Expand Down Expand Up @@ -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")

Expand All @@ -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"))
Expand Down

0 comments on commit 8dbf542

Please sign in to comment.