Skip to main content

PoePT

PoePT is a simple Selenium Python package that provides automation for interacting with the Poe chatbots. Giving you access to multiple chatbots like:

  • Assistant
  • ChatGPT-3
  • ChatGPT-4
  • Gemini
  • Bard
  • Claude-Instant

Installation

You can install PoePT using pip:

py -m pip install poept -U

or

py -m pip install git+https://github.com/Saikyo0/poept@main

Requirements:

  • a POE account (make one at poe.com)
  • Chrome

Usage

Here's an example of how to use PoePT to log in to the Poe chatbot and ask a question:

  • create connection with bot
  • login is needed every time but will only ask for code if you havent logged in before
from poept import PoePT

bot = PoePT()
bot.login("your_email@example.com") 
  • Once you're logged in, you can ask a question to the chatbot of your choice and retrieve the result
result = bot.ask(newchat=False, bot="Assistant", prompt="hello")
print(result)
  • the newchat parameter is used for either staying in the same chat for upcoming prompts or making new chat, but its ignored on the first question
  • When you're done with your session, be sure to close the connection:
bot.close()

Examples: link


Extra

  • status of client
status = bot.status
Status Meanings
false the bot isn't connected and cant answer
ready the bot is connected and ready to answer
wait the bot is generating an answer

  • Get Live Updating Result
from poept import PoePT
import threading

bot = PoePT()
bot.login("<email>@gmail.com") 

prompt = "Write A Lorem Ipsum"

def ask_bot():
    print("> "+prompt)
    bot.ask(bot="Assistant", prompt=prompt)

threading.Thread(target=ask_bot).start()
while True:
    if bot.prompt == prompt:
        if bot.status == "wait":
            print(bot.status)
            print('\r' + bot.response, end='')
        elif bot.status == "ready":
            break

  • Image Response
prompt = "An Apple"
result = bot.ask(bot="StableDiffusion3-2B", prompt=prompt, img_output=True)
print(result)

  • Live voice Input
print("Listening...") 
prompt = bot.live_voice(timeout=4)
print("Recording complete.")
result = bot.ask(bot="Assistant", prompt=prompt)
print("\nresponse:", result)
  • File voice Input
audio_file = os.path.abspath("audio.wav")
prompt = bot.file_voice(audio_file)
result = bot.ask(newchat=False, bot="Assistant", prompt=prompt)
print("\nresponse:", result)

  • Cookie control
  • default cookies path: ./saved_cookies/cookies.txt
bot.clear_cookies()
bot.load_cookies("path")

  • configure classes and keys
bot.config(self, website="https://poe.com/", #Base URL of POE.
               email_form=".textInput_input__9YpqY", #CSS selector for the email input form.
               go_btn=".Button_buttonBase__Bv9Vx.Button_primary__6UIn0",  #CSS selector for the 'Go' button.
               code_form=".VerificationCodeInput_verificationCodeInput__RgX85", #CSS selector for the verification code input div.
               login_btn=".Button_buttonBase__Bv9Vx.Button_primary__6UIn0",  #CSS selector for the login button.
               query_input_form=".GrowingTextArea_textArea__ZWQbP", #CSS selector for the chat input div.
               query_send_btn=".ChatMessageSendButton_sendButton__4ZyI4",  #CSS selector for the chat send button.
               clear_key_btn=".ChatBreakButton_button__zyEye", #CSS selector for the clear chat button.
               file_input_form=".ChatMessageFileInputButton_input__svNx4",  #CSS selector for the file input div.
               file_input_box=".ChatMessageInputAttachments_container__AAxGu", #CSS selector for the file input box in chat.
               voice_input_btn=".ChatMessageVoiceInputButton_button__NjXno",  #CSS selector for the voice input button.
               msg_element=".ChatMessage_chatMessage__xkgHx", #CSS selector for the response message element div.
            ):

Contributing

If you encounter a bug open an issue on the GitHub repository. Pull requests are also welcome!

saikyo0

Metadata

Release files for PoePT 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PoePT 0.3.1
File Size Uploaded
poept-0.3.1.tar.gz 18.9 kB Details

Release files / poept-0.3.1.tar.gz

Download URL poept-0.3.1.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
732d149b0ca03590d01b6111088403e73b3d7badee64e0112e3b0de265214850
BLAKE2b-256 checksum
How to use checksums
e657789fd5cc89297b1ae5ff1d2b6debeba470da7dd0d570a3a2dfeb37a9cab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page