Free cleverbot without headless browser
Project description
Cleverbot Scraper
Simple free cleverbot library that doesn't require running a heavy ram wasting headless web browser to actually chat with the bot, only relying on the requests module. The api is wrapped by the Cleverbot
class and you can use the send
module to receive responses from cleverbot.
Try it
Install and test with:
pip3 install cleverbot-scraper
python3 -m "cleverbot"
The last command will start a live session with the cleverbot(for testing purposes).
Examples
Chat with the bot
from cleverbot import Cleverbot
bot = Cleverbot()
print("Start the conversation, press Ctrl-c to stop \n")
try:
while True:
print(bot.send(input(">> ")))
except KeyboardInterrupt:
print("Exiting.")
Make the bot chat with itself
from cleverbot import Cleverbot
alice = Cleverbot()
bob = Cleverbot()
message = "Hi there! How are you doing?"
print("Press Ctrl-c to stop \n")
try:
while True:
print("Bob: ", message)
message = alice.send(message)
print("Alice: ", message)
message = bob.send(message)
except KeyboardInterrupt:
print("Exiting.")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cleverbot_scraper-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ef0c7acd26a96eccc5da22c946e21c363adafbe68cf3c3dbe38f8664388a5a |
|
MD5 | 1fbfefb8bb03e056007d142286535929 |
|
BLAKE2b-256 | b2a589297c7e0060a866f07088589573fa957435b63d6d43bedf6c9608731944 |