start working on chat capability

This commit is contained in:
Christophe Benz 2010-05-15 21:10:33 +02:00
commit 8344824970
4 changed files with 109 additions and 17 deletions

View file

@ -362,3 +362,8 @@ class BaseBrowser(mechanize.Browser):
self[field] = value
except ClientForm.ControlNotFoundError:
return
def post_request(self, url, data, headers):
headers['User-Agent'] = self.USER_AGENT
req = urllib2.Request(url, urllib.urlencode(data), headers)
return urllib2.urlopen(req)