summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
Diffstat (limited to 'omegle.py')
-rw-r--r--omegle.py11
1 files changed, 9 insertions, 2 deletions
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)