def get_news(cookie, class_list): allnews = [] for x in class_list: news = libportal.get_class_news(cookie, x[2]) news = [list(n) for n in news] news = [n + [x[1],] for n in news] allnews += news allnews.sort(key=lambda x: _date_cmp(x[0]), reverse=True) return allnews
def get_class_news(cookie, class_set): print libportal.get_class_news(cookie, class_set[2])