Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All requests are getting 404'd #7

Closed
Xaekai opened this issue Jun 4, 2015 · 5 comments
Closed

All requests are getting 404'd #7

Xaekai opened this issue Jun 4, 2015 · 5 comments

Comments

@Xaekai
Copy link

Xaekai commented Jun 4, 2015

As per title, this module has stopped working for me. I presume it is due to changes made on Cleverbot's end.

@yousefamar
Copy link

Same here. And same goes for https://github.com/fojas/cleverbot-node so it is indeed probably because of changes on Cleverbot's end.

@jalada
Copy link

jalada commented Jun 8, 2015

👍 might take a look.

@benmanns
Copy link
Owner

benmanns commented Jun 8, 2015

I've updated the default parameters to match the current request structure. There's also a new XVIS cookie that will need to be set before requests to /webservicemin occur. Once, I write a good way to get that cookie before requests I'll push out a new version.

@jalada
Copy link

jalada commented Jun 8, 2015

@benmanns I am in absolutely no way saying my solution is right; it was pretty hacky, but feel free to take a look for inspiration/to steal: jalada@7571738

Not submitting a pull request because I also mucked around with gems, headers etc. but the cookie management is the key change.

(And it works, so far)

@william-bratches
Copy link

This probably isn't useful, but I whipped together a selenium test in python that can be used with a headless browser to get a simple call/response to cleverbot. Just a hack until hopefully this api business gets sorted out...

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

# use phantomJS here for invisible browser
#driver = webdriver.PhantomJS()

#or plain old firefox
driver = webdriver.Firefox()

driver.get("http://www.cleverbot.com")

def send_message():

    # prompt user for text
    message = raw_input('Enter a message:')

    # set value of text box
    driver.find_element_by_class_name('stimulus').send_keys(message)

    # hit send
    driver.find_element_by_class_name('sayitbutton').click()

    # get cleverbot output
    time.sleep(5) # takes a moment for text to appear on screen...which sucks
    sentences = driver.find_elements_by_xpath('.//span[@class = "bot"]')
    print sentences[len(sentences) - 1].text

    send_message()



send_message()

kadmelia pushed a commit to kadmelia/Viby that referenced this issue Aug 31, 2015
kadmelia pushed a commit to kadmelia/Viby that referenced this issue Aug 31, 2015
@benmanns benmanns closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants