This is a personal open source project. Please use nobo
at your own risk.
nobo is a spider that you could get your data from each service provides by Ritsumeikan Univ.
You can use nobo to build your own data API with many frameworks(Flask
, Django
etc.).
Ritsumeikan University deployed f5 obfuscator several months ago. :(
Although, I don't know the situation in other schools. The truth is legacy version cannot work perfectly nowadays.
But if you wanna build your own spider with legacy version, please check the legacy
branch.
The mainly difference between legacy
version and master
version:
legacy
userequests
to send requests, butmaster
use webdriver for Chrome.legacy
is faster, but it cannot handle the page with code confusion.
- [manaba] course list @ 7/28/2018
- [manaba] better performance @ 1/28/2019
- [syllabus] ritsumei syllabus -> manaba syllabus
- [syllabus] get syllabus by id
- [manaba] announcement list
- [syllabus] search syllabus by string
- [compusweb] scholarship information
- [compusweb] final test information
- [compusweb] grade information
GPLv3
-
Install Python 3.
Recommended Python Version: 3.7.1+ -
Install
nobo
withpip
/pip3
pip3 install nobo
-
Install latest version of Chrome and ChromeDriver
- Chrome, latest version is recommended
- ChromeDriver, unzip and move
chromedriver
/chromedriver.exe
into your project directory.
-
Use nobo in your project (.py).
import nobo # if you wanna output in an easy way import nobo.io
It seems that Manaba of each school are different, you can change a little bit code inside manaba.py to let nobo be compatible with your manaba page.
-
Create a
RitsStudent
instance.fangzhou = nobo.RitsStudent("is0000ab", "12345678")
-
Use
get_course_list()
method to get all courses information.
get_course_list()
will login automatically. After parsing, it will return a list that contains all information of courses.
Usetry...except...finally...
to handle exceptions is highly recommanded.try: course_list = fangzhou.get_course_list() nobo.io.export_as_json("temp.json", course_list) finally: exit()
The example course will show as following.
[
{
"basic": [
{
"code": 33698,
"name": "ソフトインテリジェンス",
"class": "D1"
}
],
"time": {
"year": 2018,
"semester": "fall",
"weekday": "Wednesday",
"period": "2",
"sci_period_start": "3",
"sci_period_end": "4"
},
"room": "C402",
"teacher": [
"前田 陽一郎"
]
},
{
...
other courses
...
}
]