Python Forum
college grades checking - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: college grades checking (/thread-4715.html)



college grades checking - marfly32 - Sep-04-2017

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]


RE: college grades checking - Larz60+ - Sep-04-2017

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:


RE: college grades checking - marfly32 - Oct-04-2017

(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


RE: college grades checking - Larz60+ - Oct-04-2017

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)


RE: college grades checking - marfly32 - Oct-04-2017

(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