cURL / Mailing Lists / curl-library / Single Mail

curl-library

Posting Data

From: preetic <preetic_at_mahiti.org>
Date: Wed, 14 Aug 2002 15:27:36 +0530

Hi all!

I dont seeem to get out of this posting data problem.
My application is basically tryig to add new info into a website.
I am able to get thru the login page n enter the page where i can add a
new course.I am able to add the course,However once i click on to it to
the make any edits to this new course the site asks for another login info
which i pass thru my application on which it should show the edit page but
am not able to get it.

can anybody help me?This is the piece of code:-

import pycurl
import urllib
import try1
curl=pycurl.init()
curl.setopt(pycurl.URL,'http://tarahaat/tara/Grill/TARAgrill/tara/setrollnumber')
dataread="username=ABCpassword=DFG&Submit=XCV"
curl.setopt(pycurl.VERBOSE,1)
curl.setopt(pycurl.POST,1)
curl.setopt(pycurl.POSTFIELDS,dataread)
curl.setopt(pycurl.HEADER,1)
curl.setopt(pycurl.FOLLOWLOCATION,1)
curl.setopt(pycurl.COOKIEJAR,'mycookies.txt')
curl.setopt(pycurl.COOKIEFILE,'mycookies.txt')
curl.perform()
curl.setopt(pycurl.URL,'http://tarahaat/tara/Grill/TARAgrill/courseadd')
curl.setopt(pycurl.POST,1)
dataupdate=urllib.urlencode(try1.infodictionary)
print dataupdate
curl.setopt(pycurl.POSTFIELDS,dataupdate)
curl.perform()
coursename= try1.infodictionary
curl.setopt(pycurl.URL,'http://tarahaat/tara/Grill/TARAgrill/' +
coursename['name'] + '/courseedit'
data="came_from=http://tarahaat/tara/Grill/TARAgrill/"+ coursename['name']
+ "/courseedit&__ac_name=dsfd&_ac_password=fsd&submit=Login"
curl.setopt(pycurl.POST,1)
curl.setopt(pycurl.POSTFIELDS,data)
curl.perform() #the pageshowing the edit info is not being shown only a
#blank page comes.
curl.cleanup()

i have checked it and i havent missed any data that is required for the
course to get added to the database.

Cheers

Preeti

-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
Received on 2002-08-14