-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconstant.py
43 lines (29 loc) · 926 Bytes
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os
from dotenv import load_dotenv
load_dotenv()
YEAR = os.getenv("YEAR") or ""
SEM = os.getenv("SEM") or ""
USERNAME = os.getenv("STUDENTID") or ""
PASSWORD = os.getenv("STUDENTPWD") or ""
SERVER_URL = "https://es.nccu.edu.tw/"
KEY = "angu1arjjlST@2019"
SEM_API = SERVER_URL + "semester/"
PERSON_API = SERVER_URL + "person/"
COURSE_API = SERVER_URL + "course/"
TRACE_API = SERVER_URL + "tracing/"
def URL(id, year_sem=YEAR + SEM):
return (
"http://newdoc.nccu.edu.tw/teaschm/"
+ year_sem
+ "/statistic.jsp-tnum="
+ id
+ ".htm"
)
def COURSE_RATE_URL(param, year_sem=YEAR + SEM):
return "http://newdoc.nccu.edu.tw/teaschm/" + year_sem + "/" + param
YEAR_SEM = YEAR + SEM
def RATE_QRY():
return str(os.getenv("RATE_QRY")).split(",")
COURSERESULT_YEARSEM = ["1102", "1111", "1112", "1121"]
def COURSERESULT_CSV(sem):
return sem + "CourseResult.csv"