dju-intranet

Daejeon university intranet API


License
Other
Install
pip install dju-intranet==0.1.8

Documentation

Dju intranet

This project gives you Api for Daejeon university intranet. Daejeon university's web sites are sucks. So I made it.

Examples

Login

>>> import djuintra
>>> da = djuintra.DjuAgent()
>>> da.login('<User ID>', '<User PW>')
>>> # Nothing happen if logged in successfully, else raise an exception.

Get Time tables

>>> for timetable in da.get_timetables(2014, 2, 0, '00000', 0):
...     print(u'{0.classname} by {0.profname} {0.score}/{0.time}'.format(timetable))
๋Œ€ํ•™์˜์–ด(1) by ์ œ์ž„์Šค์ธ๋จธํ•„๋“œ 2/2
๋Œ€ํ•™์˜์–ด(1) by ํŽ˜๋ฆฌ 2/2
๋Œ€ํ•™์˜์–ด(1) by ๋„ค๋“œ์ฝ•์Šค 2/2
๋Œ€ํ•™์˜์–ด(1) by ํ‹ฐ๋จธ์‹œ๋กค๋žœ๋“œ 2/2
๋Œ€ํ•™์˜์–ด(1) by ๋ธŒ๋ผ์ด์–ธ๋งฅ์ปฌ๋ฆฌ 2/2
๋Œ€ํ•™์˜์–ด(1) by ์ œ์ž„์Šค์ธ๋จธํ•„๋“œ 2/2
๋Œ€ํ•™์˜์–ด(1) by ํŽ˜๋ฆฌ 2/2
๋Œ€ํ•™์˜์–ด(1) by ๋„ค๋“œ์ฝ•์Šค 2/2
๋Œ€ํ•™์˜์–ด(1) by ํ‹ฐ๋จธ์‹œ๋กค๋žœ๋“œ 2/2
๋Œ€ํ•™์˜์–ด(1) by ๋ธŒ๋ผ์ด์–ธ๋งฅ์ปฌ๋ฆฌ 2/2
๋Œ€ํ•™์˜์–ด(1) by ์•„๋‹ด๋“œ๋ ˆ์Šฌ๋Ÿฌ 2/2
๋Œ€ํ•™์˜์–ด(1) by ๋งˆ์ด๋„ˆ 2/2
๋Œ€ํ•™์˜์–ด(1) by ๋กœ๋“œ๋ฆฌ๊ณ ๋ฒ„๋ฎค์ฆˆ 2/2

Get Schedules

>>> for schedule in da.get_schedules():
...     print(u'{0.title}({0.depart}): {0.start}~{0.end}'.format(schedule))
...
์ˆ˜์—…์ผ์ˆ˜1/3์„ (ํ•™์‚ฌ์„œ๋น„์ŠคํŒ€): 2014-10-05 09:00:00~2014-10-05 23:59:59
์ „์—ญ๋ณตํ•™๋งˆ๊ฐ์ผ์ž(๊ฐœ๊ฐ•ํ›„3์ฃผ๋‚ด)(ํ•™์‚ฌ์„œ๋น„์ŠคํŒ€): 2014-09-19 17:30:00~None
ํœดํ•™์‹ ์ฒญ๊ธฐ๊ฐ„(ํ•™์‚ฌ์„œ๋น„์ŠคํŒ€): 2014-08-04 09:00:00~2014-08-14 17:30:00
๋ณตํ•™์‹ ์ฒญ๊ธฐ๊ฐ„(ํ•™์‚ฌ์„œ๋น„์ŠคํŒ€): 2014-07-14 09:00:00~2014-07-25 17:30:00
๋ถ€/๋ณต์ˆ˜์ „๊ณต์‹ ์ฒญ๊ธฐ๊ฐ„(ํ•™์‚ฌ์„œ๋น„์ŠคํŒ€): 2014-07-07 09:00:00~2014-07-11 17:30:00
๋ชจ์˜ํ† ์ต์›์„œ์ ‘์ˆ˜์‹ ์ฒญ๊ธฐ๊ฐ„(์™ธ๊ตญ์–ด๊ต์œก์„ผํ„ฐ): 2014-09-15 12:00:00~2014-09-19 17:00:00

Get personal scores

personal_scores = da.get_personal_scores()
for semester in personal_scores.semesters:
    print(semester.title)
    for score in semester.scores:
        print(u'{0.title}: {0.score}'.format(score))
print(u'Average score: {0}'.format(personal_scores.averagescore))

Course registration

courses = [
    ('000000', '01'),
    ('000001', '02'),
    ('010101', '30'),
]

da.register_course(courses)

Documentation

http://dju-intranet.readthedocs.org/en/latest/

https://readthedocs.org/projects/dju-intranet/badge/