Python Forum

Full Version: college grades checking
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, guys! Firstly, sorry for my raw coding skills. To start with, i've go no idea how to make it happen, i did my newbies research :( , and come up just with genereal logic. I wanna make a script, which will check my grades on my college website, and in case if new grades were added it will notify me by email. Im new to python, so i just wanna ask is general logic of my code is right?
[python]
import urlb. www.college.com # my college website
log in (login, password) # in order to log into my personal account
go to www.college.com/grades # going to page, where grades are
if grades =/ null # if there is no empty column, then notify me
send email to (*****@gmail.com)* to notify me if new grades were added
else:
dont do anything


/python]
you can start by writing a list in plain language the steps that you think are needed.
then break each step into components that relate to code:
For example:
(Sep-04-2017, 04:19 PM)Larz60+ Wrote: [ -> ]you can start by writing a list in plain language the steps that you think are needed.
then break each step into components that relate to code:
For example:  

Hey hello! Thanks for reply!
Here is what i came up with so far:

import requests
url = 'http://college.com/php'
values = {'username': 'user',
'password': 'pass'}

r = requests.post(url, data=values)
print r.content

url= "http://college.com/grades"
And im stuck Wall , dunno what else to do
you should use getpass:
import getpass
password = getpass.getpass('Password:')
but you should not be posting... and using requests incorrectly
format is:
requests.post(url, parameters, data, headers)
(Oct-04-2017, 03:45 PM)Larz60+ Wrote: [ -> ]you should use getpass:
import getpass
password = getpass.getpass('Password:')
but you should not be posting... and using requests incorrectly
format is:
requests.post(url, parameters, data, headers)

ohh, i see now! Thank you dude. You are the best!! Cool