Harness the Power of ChatGPT Without API Credits: Introducing GPT_scraper

Rodolflying
3 min readMar 15, 2023

--

Unlock the potential of ChatGPT without limitations — GPT_scraper bridges the gap between convenience and cost-efficiency in the world of AI-powered conversations

Introduction:

ChatGPT is an advanced AI language model that provides human-like text generation capabilities. While the official API offers a convenient way to interact with ChatGPT, it can also consume API credits, which may be a concern for some users. To address this issue, GPT_scraper is a Python-based solution that leverages Selenium and BeautifulSoup4 to enable a programmable ChatGPT experience without using API credits. In this article, we’ll walk you through the GPT_scraper repository, its requirements, and usage

Here you can check out the git repo:

https://github.com/rodolflying/GPT_scraper

Requirements:

Before getting started with GPT_scraper, ensure you have the following components installed and configured:

  1. Python 3.x
  2. Selenium
  3. BeautifulSoup4
  4. Requests
  5. Google Chrome (version 111 or later)
  6. ChromeDriver

You can install the required Python packages using the following command

pip install beautifulsoup4, selenium

For ChromeDriver, download the appropriate version from the official website and move the executable file to the C:/ folder.

Usage:

To use GPT_scraper, follow these steps:

  1. Log in to Chat GPT using your main Google Chrome application. GPT_scraper relies on your browsing history, so it won’t work if you have another instance of Chrome open.
  2. Close all running instances of Google Chrome.
  3. Run the scraper.py script with the command python scraper.py.
  4. Start interacting with ChatGPT by entering your questions or messages at the terminal prompt.
  5. To end the conversation, type one of the following commands: ‘exit’, ‘quit’, ‘bye’, ‘goodbye’, ‘adios’, ‘hasta luego’, ‘hasta la vista’, ‘chao’, ‘chau’, ‘nos vemos’, ‘nos vemos luego’, ‘nos vemos pronto’, ‘nos vemos luego’, ‘nos vemos’, ‘until next time’, ‘talk to you later’, ‘see you soon’, ‘take care’.

After you finish your conversation with ChatGPT, GPT_scraper will save the chat history as a JSON file in the project folder. The filename will include the date and time of the conversation in the format %Y-%m-%d_%H-%M-%S, such as conversation_2023-03-13_12-33-05.json.

Midjourney — Happy Chat Bot

Conclusion:

GPT_scraper offers a practical alternative to the official ChatGPT API, enabling users to interact with the AI model programmatically without consuming API credits. By using Selenium and BeautifulSoup4, GPT_scraper also could provides features for storing, filtering, and classifying past prompts, making it a valuable tool for users seeking a more streamlined ChatGPT experience. If you are interested on the features yet to develop, let me know in the comments or collaborate with me in github!

Enjoy your conversations!

--

--

Rodolflying

Industrial Engineer. I find inspiration in data science and technology to solve real-life problems. https://www.linkedin.com/in/rodolfo-sepulveda-847532135/