Skip to content

Instantly share code, notes, and snippets.

@six519
Created August 5, 2013 12:07
Show Gist options
  • Save six519/6155445 to your computer and use it in GitHub Desktop.
Save six519/6155445 to your computer and use it in GitHub Desktop.
Talk To Elbot
"""
If you want to talk to Elbot!!!!!!
"""
import urllib
import urllib2
def talk_to_elbot(msg):
data = {
'IDENT':'J0YOjADZAb',
'USERLOGID':'KEcvvyL9xA',
'EXTRAINPUT':'6',
'ENTRY':msg
}
response = urllib2.urlopen('http://elbot_e.csoica.artificial-solutions.com/cgi-bin/elbot.cgi',urllib.urlencode(data))
s = str(response.read())
s = s.split('<!-- Begin Response !-->')
s = s[1].strip().split('<!-- End Response !-->')[0].strip().replace('<!-- Country: -->','')
print s
response.close()
talk_to_elbot('Hello. My name is Ferdinand.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment