Menu

#23 unable to connect

open
nobody
Connection (5)
5
2007-01-12
2007-01-12
Anonymous
No

For whatever reason the function sendRequest under gmailatom.py was not able to correctly login. All other aspects of the program worked, but no dice on actually getting the atom feed.

I added the following few lines to that file:

-------
Class GmailAtom:
usr = ""
password = ""
-------
def __init__(self, user, pswd):
self.usr = user
self.password = pswd
-------

Then hacked refreshInfo to be the following:

-------
def refreshInfo(self):
# get the page and parse it
#p = sax.parseString( self.sendRequest().read(), self.m)
output = subprocess.Popen([r"wget",self.url,"-nv","--user="+self.usr,"--password="+self.password,"--ou\
tput-document=-"],stdout=subprocess.PIPE).communicate()[0]
p = sax.parseString( output, self.m )
-------

That is, I call wget to grab the atom feed rather than use sendRequest. This works for me.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB