Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19444

Http post and http get

From "n3d!m" <nedimmuminovic@gmail.com>
Newsgroups comp.lang.python
Subject Http post and http get
Date 2012-01-25 14:23 -0800
Organization http://groups.google.com
Message-ID <26848894.3029.1327530209876.JavaMail.geo-discussion-forums@vbxy22> (permalink)

Show all headers | View raw


I am writing python script which will log into openSIS (Student information system) and get grades. Demo of website is available here: http://demo.os4ed.com/
Here is code which works for that site:

#!/usr/bin/python
import requests
user_login={'USERNAME':'student','PASSWORD':'student'}
r=requests.post("http://demo.os4ed.com/index.php", data=user_login)
r=requests.get("http://demo.os4ed.com/for_export.php?modname=Grades/Transcripts.php&modfunc=save&_openSIS_PDF=true&controller=Y&st_arr[]=1", cookies=r.cookies)
print r.text

My problem is when I try the same thing with my school's openSIS. It returns me error:
<SCRIPT language=javascript>history.back();alert("You must choose at least one student and marking period");</SCRIPT>

Their openSIS is installed on port 8080. Does port 8080 causes problem with my script?

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Http post and http get "n3d!m" <nedimmuminovic@gmail.com> - 2012-01-25 14:23 -0800
  Re: Http post and http get Jon Clements <joncle@googlemail.com> - 2012-01-25 16:34 -0800
  Re: Http post and http get "n3d!m" <nedimmuminovic@gmail.com> - 2012-02-06 13:18 -0800

csiph-web