Skip to content

ChatGPT

ChatGPT targets chatgpt.com. All methods shared with Gemini are documented on the Shared Interface page — this page covers only what is specific to ChatGPT.


Login

ChatGPT works without login for text queries only. Signed out, chatgpt.com serves a reduced site that gates both file upload and image generation behind a login — passing attachments raises LoginRequiredError there, and image prompts come back as a prompt to log in. Run ChatGPT.setup() and log in to enable both. Setup is also recommended regardless for bot detection, as it builds a persistent browser profile.


Supported attachments

ChatGPT.SUPPORTED_ATTACHMENTS is the set of file extensions accepted for upload. Passing any other extension to send_message() or query() raises a ValueError before touching the browser.

print(ChatGPT.SUPPORTED_ATTACHMENTS)
# {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.pdf', '.csv', '.txt', '.json'}

hermex.chatgpt.ChatGPT

Bases: Scraper

Scraper for ChatGPT (chatgpt.com).

Supports text queries, file uploads, and downloading generated images.

Only text queries work without login. OpenAI gates file upload and image generation behind a login on the signed-out site, so both require a session established via ChatGPT.setup(). Passing attachments in guest mode raises LoginRequiredError.

SUPPORTED_ATTACHMENTS = {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.pdf', '.csv', '.txt', '.json'} class-attribute instance-attribute


Generated images

ChatGPT does not watermark its generated images. The remove_watermark parameter on query() and get_last_response() is accepted but has no effect.


Default URL

open_url() defaults to https://chatgpt.com and raises ValueError if a non-ChatGPT URL is passed.