diff --git a/.gitignore b/.gitignore index 5874785..c669f1d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ *.db secrets.py ENV +snipeenv +venv diff --git a/app.py b/app.py index 4fe737a..54b2d65 100644 --- a/app.py +++ b/app.py @@ -25,7 +25,6 @@ app.logger.addHandler(file_handler) app.wsgi_app = ProxyFix(app.wsgi_app) - app.config['MAIL_SERVER'] = 'smtp.sendgrid.net' app.config['MAIL_PORT'] = 587 app.config['MAIL_USE_TLS'] = True @@ -103,7 +102,7 @@ def ajaxtest(): message = Message('Sniper tests are failing', sender=EMAIL_SENDER) message.body = 'FIX IT' - message.add_recipient('vaibhav2614@gmail.com') + message.add_recipient('brimck89@gmail.com') mail.send(message) return json.dumps(result) diff --git a/check.txt b/check.txt new file mode 100644 index 0000000..d06ddba --- /dev/null +++ b/check.txt @@ -0,0 +1,61 @@ +alembic==0.3.5 +aws-cfn-bootstrap==1.4 +awscli==1.14.9 +Babel==0.9.4 +backports.ssl-match-hostname==3.4.0.2 +blinker==1.2 +boto==2.48.0 +botocore==1.8.13 +chardet==1.1 +cloud-init==0.7.6 +colorama==0.2.5 +configobj==4.7.2 +docutils==0.11 +ecdsa==0.11 +Flask==0.9 +Flask-Mail==0.6.1 +Flask-SQLAlchemy==0.16 +Flask-WTF==0.8 +flup==1.0.3.dev20110405 +futures==3.0.3 +gunicorn==0.15.0 +hibagent==1.0.0 +httplib2==0.7.4 +iniparse==0.3.1 +Jinja2==2.6 +jmespath==0.9.2 +jsonpatch==1.2 +jsonpointer==1.0 +kitchen==1.1.1 +lamson==1.1 +lockfile==0.9.1 +Mako==0.7.2 +MarkupSafe==0.15 +mock==1.0b1 +nose==1.1.2 +paramiko==1.15.1 +PIL==1.1.6 +ply==3.4 +pyasn1==0.1.7 +pycrypto==2.6.1 +pycurl==7.19.0 +pygpgme==0.3 +PyJWT==0.1.2 +pyliblzma==0.5.3 +pystache==0.5.3 +python-daemon==1.6 +python-dateutil==2.1 +pyxattr==0.5.0 +PyYAML==3.10 +requests==0.13.5 +rsa==3.4.1 +simplejson==3.6.5 +six==1.8.0 +SQLAlchemy==0.7.8 +twilio==3.3.10 +urlgrabber==3.10 +urllib3==1.8.2 +virtualenv==15.1.0 +Werkzeug==0.8.3 +WTForms==1.0.1 +yum-metadata-parser==1.1.4 diff --git a/cron.py b/cron.py index cff7eba..0aac043 100644 --- a/cron.py +++ b/cron.py @@ -75,7 +75,7 @@ def notify(snipe, index): # build the url for prepopulated form url = 'http://sniper.rutgers.io/?%s' % (urllib.urlencode(attributes)) - register_url = 'https://sims.rutgers.edu/webreg/editSchedule.htm?login=cas&semesterSelection=12018&indexList=%s' % (index) + register_url = 'https://sims.rutgers.edu/webreg/editSchedule.htm?login=cas&semesterSelection=92018&indexList=%s' % (index) email_text = 'A course (%s) that you were watching looks open. Its index number is %s. Click the link below to register for it!\n\n %s \n\n If you don\'t get in, visit this URL: \n\n %s \n\n to continue watching it.\n\n Send any feedback to sniper@rutgers.io' % (course, index, register_url, url) diff --git a/soc.py b/soc.py index a00eb19..ac8b81b 100644 --- a/soc.py +++ b/soc.py @@ -6,7 +6,7 @@ class Soc: """ Communicates with Rutgers SOC """ - def __init__(self, campus='NB', semester='12018', level='U,G'): + def __init__(self, campus='NB', semester='92018', level='U'): """ We always use certain parameters""" self.base_url = 'http://sis.rutgers.edu/soc' self.params = { @@ -17,10 +17,9 @@ def __init__(self, campus='NB', semester='12018', level='U,G'): # Spoof the user agent for good measure self.headers = { - 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36', } - def query(self, resource, params): """Queries the given resource (a string) with the given parameters. For example self.query('/api/subjects.json', { 'keyword': 'Computer Science' })""" diff --git a/templates/home.html b/templates/home.html index e8ff7a5..9e68db8 100644 --- a/templates/home.html +++ b/templates/home.html @@ -6,7 +6,7 @@ {% from "_formhelpers.html" import render_field %}
-

Enter your details below, and I'll notify you when your class opens up. Sniper is currently watching courses for Spring 2018 on the Rutgers New Brunswick campus.

+

Enter your details below, and I'll notify you when your class opens up. Sniper is currently watching courses for Fall 2018 on the Rutgers New Brunswick campus.