Skip to content

Commit a254516

Browse files
committed
Trim the space in location
1 parent b21b721 commit a254516

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scrapers/calendar.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"log"
1212
"net/http"
1313
"os"
14+
"strings"
1415
"time"
1516

1617
"github.com/UTDNebula/api-tools/utils"
@@ -64,7 +65,8 @@ func ScrapeCalendar(outDir string) {
6465
endTime = parseTime(toString(eventInstance["end"]))
6566
}
6667

67-
location := utils.TrimWhitespace(fmt.Sprintf("%s, %s", toString(rawEvent.Event["location_name"]), toString(rawEvent.Event["room_number"])))
68+
// Parse location
69+
location := strings.Trim(fmt.Sprintf("%s, %s", toString(rawEvent.Event["location_name"]), toString(rawEvent.Event["room_number"])), " ,")
6870

6971
// Parse the event types, event topic, and event target audience
7072
filters := toMap(rawEvent.Event["filters"])

0 commit comments

Comments
 (0)