<commit_before>import requests
from icalendar import Calendar, Event
import icalendar
import pytz
import sys
import datetime
from lxml import html

reload(sys);
sys.setdefaultencoding("utf8") #Page uses UTF

class Course:
	name = ""
	sections = []

	def __init__(self, n):
		self.name = n
		self.sections = []

class Section:
	name =""
	location = ""
	startDateTime = 0
	endDateTime =0
	lastClass = 0

	def __init__(self, _name, _location, _startDateTime, _endDateTime, _lastClass):
		self.name = _name
		self.location = _location
		self.startDateTime = _startDateTime
		self.endDateTime = _endDateTime
		self.lastClass = _lastClass

	def __repr__(self):
		return self.name + ", Location: " + self.location + " start Time: " + str(self.startDateTime) + " End Time: " + str(self.endDateTime)


def uwoDaytoWeekDay(day):
	if day == "Mo":
		return 1
	elif day == "Tu":
		return 2
	elif day == "We":
		return 3
	elif day == "Th":
		return 4
	elif day == "Fr":
		return 5

courseList = []
userName = "PARGALL2"
password = '***'
EST = pytz.timezone('US/Eastern')

LoginURL = 'https://student.uwo.ca/psp/heprdweb/EMPLOYEE/HRMS/c/UWO_WISG.WSA_STDNT_CENTER.GBL&languageCd=ENG';
schedURL = 'https://student.uwo.ca/psc/heprdweb/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL';

payload = {'httpPort2' : '',
		'timezoneOffset2':0,
		'userid':userName.upper(),
		'pwd':password,
		'Submit':'Sign In'}
s = requests.Session();

#login in
s.post(LoginURL, params=payload);

#get Sched<commit_msg>Changed from hardcoded username and password to request it from user<commit_after>import requests
from icalendar import Calendar, Event
import icalendar
import pytz
import sys
import datetime
from lxml import html
import getpass

reload(sys);
sys.setdefaultencoding("utf8") #Page uses UTF

class Course:
	name = ""
	sections = []

	def __init__(self, n):
		self.name = n
		self.sections = []

class Section:
	name =""
	location = ""
	startDateTime = 0
	endDateTime =0
	lastClass = 0

	def __init__(self, _name, _location, _startDateTime, _endDateTime, _lastClass):
		self.name = _name
		self.location = _location
		self.startDateTime = _startDateTime
		self.endDateTime = _endDateTime
		self.lastClass = _lastClass

	def __repr__(self):
		return self.name + ", Location: " + self.location + " start Time: " + str(self.startDateTime) + " End Time: " + str(self.endDateTime)


def uwoDaytoWeekDay(day):
	if day == "Mo":
		return 1
	elif day == "Tu":
		return 2
	elif day == "We":
		return 3
	elif day == "Th":
		return 4
	elif day == "Fr":
		return 5

courseList = []
userName = raw_input('Enter your uwo username: ')
password = <PASSWORD>()
EST = pytz.timezone('US/Eastern')

LoginURL = 'https://student.uwo.ca/psp/heprdweb/EMPLOYEE/HRMS/c/UWO_WISG.WSA_STDNT_CENTER.GBL&languageCd=ENG';
schedURL = 'https://student.uwo.ca/psc/heprdweb/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL';

payload = {'httpPort2' : '',
		'timezoneOffset2':0,
		'userid':userName.upper(),
		'pwd':password,
		'Submit':'Sign In'}
s = requests.Session();

#login in
s.post(LoginURL, params=payload);

#get Sched
{'fraction_non_alphanumeric': 0.1368796626662342, 'fraction_numerical': 0.008108984755108661, 'mean_word_length': 4.477797513321492, 'pattern_counts': {'":': 10, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1755974', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1123, 'n_words': 265}