summaryrefslogtreecommitdiff
path: root/omegle.py
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-11 10:25:13 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-11 10:25:13 +0000
commit09fa481b3181129d4acb02a969abd08ffa753025 (patch)
tree2aa5e53243aaba58444045242621a89b07566930 /omegle.py
parent8f3af268d4091fd6488a23480cbfdd9351046f42 (diff)
downloadomegle-09fa481b3181129d4acb02a969abd08ffa753025.tar.gz
omegle-09fa481b3181129d4acb02a969abd08ffa753025.zip
ibla
git-svn-id: http://xapek.org/svn/common/omegle@1108 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
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)