summaryrefslogtreecommitdiff
path: root/aplus.go
diff options
context:
space:
mode:
Diffstat (limited to 'aplus.go')
-rw-r--r--aplus.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/aplus.go b/aplus.go
index 96fbd92..dfc73e1 100644
--- a/aplus.go
+++ b/aplus.go
@@ -14,7 +14,9 @@ import (
14func submit_code(course_code int, attendance_code string) { 14func submit_code(course_code int, attendance_code string) {
15 cur_body := launch_aplus(course_code) 15 cur_body := launch_aplus(course_code)
16 16
17 fmt.Printf("%s", cur_body) 17 if verbose {
18 fmt.Printf("%s", cur_body)
19 }
18 20
19 current_url := fmt.Sprintf("%s/student/", base_aplus_link) 21 current_url := fmt.Sprintf("%s/student/", base_aplus_link)
20 // the links to submit the code for a class is under the dayPanel div 22 // the links to submit the code for a class is under the dayPanel div
@@ -33,10 +35,12 @@ func submit_code(course_code int, attendance_code string) {
33 link_url := current_url + cur_body[link_start:link_end] 35 link_url := current_url + cur_body[link_start:link_end]
34 link_url = html.UnescapeString(link_url) 36 link_url = html.UnescapeString(link_url)
35 37
36 fmt.Println("!!!") 38 if verbose {
37 fmt.Printf("%i %i %i\n", daypanel_start, link_start, link_end) 39 fmt.Println("!!!")
38 fmt.Println(link_url) 40 fmt.Printf("%i %i %i\n", daypanel_start, link_start, link_end)
39 fmt.Println("!!!") 41 fmt.Println(link_url)
42 fmt.Println("!!!")
43 }
40 44
41 resp, _ := client.Get(link_url) 45 resp, _ := client.Get(link_url)
42 body, _ := io.ReadAll(resp.Body) 46 body, _ := io.ReadAll(resp.Body)