diff options
Diffstat (limited to 'omegle.py')
-rw-r--r-- | omegle.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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) |