Created
August 5, 2013 12:07
-
-
Save six519/6155445 to your computer and use it in GitHub Desktop.
Talk To Elbot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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