Skip to content

Instantly share code, notes, and snippets.

@leandroh
Created January 21, 2010 19:34
Show Gist options
  • Save leandroh/283116 to your computer and use it in GitHub Desktop.
Save leandroh/283116 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'net/http'
botid = "f5d922d97e345aa1"
botcust = "a47d79b2be70536d"
url = "http://www.pandorabots.com/pandora/talk"
response = Net::HTTP.post_form(URI.parse(url), {'input' => ARGV.join(' '), 'botid' => botid, 'botcust2' => botcust, 'skin' => 'custom_input'})
puts response.body.split("ALICE:").last.split("\n").first.gsub(/<\/?[^>]*>/, "").strip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment