def get_homework(cookie, class_list): allhomework = [] for x in class_list: homework = libportal.get_class_homework(cookie, x[2]) homework = [list(n) for n in homework] homework = [n + [x[1],] for n in homework] allhomework += homework allhomework.append(['/'.join([str(x) for x in time.gmtime()[0:3]]), ' - YA_AY 今天在這裡 YA_AY', '-'*100, '', '', '', '']) allhomework.sort(key=lambda x: _date_cmp(x[0]), reverse=True) return allhomework
def get_class_homework(cookie, class_set): return libportal.get_class_homework(cookie, class_set[2])