Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
college grades checking
#1
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]
Reply
#2
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:
Reply
#3
(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
Reply
#4
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)
Reply
#5
(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
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020