def all(): user, password = credentials.login() session = scrap.loguc3m(user, password) if session is None: return grades = scrap.access_directory(session=session) if grades is None: return coding.from_unicode_to_ascii(grades) saving.grades_to_csv(grades, 'degree_names') iterate_over_grades(grades, session)
def engineering(): user, password = credentials.login() session = scrap.loguc3m(user, password) if session is None: return grades = scrap.access_directory(session=session) if grades is None: return coding.from_unicode_to_ascii(grades) eng_grades = [] for grade in grades: if 'Ingenieria' in grade['name']: eng_grades.append(grade) saving.grades_to_csv(eng_grades, 'degree_names_engineering') iterate_over_grades(eng_grades, session)