From 09fa481b3181129d4acb02a969abd08ffa753025 Mon Sep 17 00:00:00 2001 From: yvesf Date: Thu, 11 Jun 2009 10:25:13 +0000 Subject: ibla git-svn-id: http://xapek.org/svn/common/omegle@1108 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- omegle.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'omegle.py') diff --git a/omegle.py b/omegle.py index 8aac69e..5520f3f 100644 --- a/omegle.py +++ b/omegle.py @@ -1,5 +1,6 @@ import sys import httplib +import socket import urllib import time import json @@ -139,9 +140,15 @@ class OmegleChat(RESTClient): self.logger.error("Cant send message if not is_confirmed") return ###XXX raise?? - params = {'ala':'gaga','id':self.id,'msg':msg,'zla2':'gaga2'} + params = {'id':self.id,'msg':msg} params = urllib.urlencode(params) - r = RESTClient.request(self,"POST","/send",params) + try: + r = RESTClient.request(self,"POST","/send",params) + except Exception,e: + self.logger.error("Error by /send request: %s" % e) + raise e + return + body = r.read() if body != "win": self.logger.error("/send; Bad response %s" % body) -- cgit v1.2.1