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
newchatparameter 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!
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| poept-0.3.1.tar.gz | 18.9 kB | Without provenance | Details for poept-0.3.1.tar.gz |
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
|
Security for PoePT 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.