Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

copbot_java

This is it—my first serious project. I built this back in 2017-2018 when I was 14, diving headfirst into the world of programming. My goal was ambitious: create a bot to automate buying limited-edition items from e-commerce sites like Supreme and Palace.

This repository is a time capsule of that journey. It's where I cut my teeth on some pretty complex concepts, learning everything as I went. It's not perfect, but I'm incredibly proud of what I was able to build.


🚀 What I Built (Features)

I tried to pack in all the features I thought a real automation tool would need. I was really proud of what I managed to get working:

  • Multi-threaded for Speed: I knew speed was everything for "copping" items, so I dove into multi-threading to make the web crawler and bot tasks run as fast as possible, first with manual threads and later with a proper ExecutorService.
  • Staying Under the Radar: To avoid getting blocked, I built a couple of stealth features:
    • Smart User-Agent Rotation: A utility that picks a random, legitimate-looking user agent, cleverly weighted by real browser popularity at the time.
    • Proxy Support: A simple handler to rotate through a list of proxies for every request.
  • A Local Brain (Database): Instead of keeping everything in memory, I decided to hook the bot up to a MySQL database. Learning JDBC and writing SQL to store all the item data I scraped was a huge step for me.
  • A Proper UI: I didn't want just a command-line tool, so I built a Swing-based GUI to act as a control panel. It had live logging (with colors for errors!) and buttons to start and stop everything.
  • The Full Checkout: The core of the bot could handle the entire checkout flow—managing cookies, grabbing security tokens from the page, and submitting all the payment and shipping forms automatically using Apache's HttpClient.

🏛️ How It Evolved

You can literally see my learning process in the code.

I started with the automationFramework package. It worked, but it was messy. I was passing data around in separate lists and managing threads by hand. I quickly realized this wasn't going to scale.

That led to the big refactor: automationFramework2. This was my attempt to do things "the right way." I broke the logic down into objects like itemObject and userProfile, and created separate managers for crawling (CrawlerManager) and handling orders (orderManager). It was a lot more organized and felt like a real application.


🛠️ Tech I Used

This project was my playground for a bunch of technologies:

  • Language: Java
  • Database: MySQL (with the JDBC driver)
  • GUI: Java Swing
  • Key Libraries I Learned:
    • Jsoup & Jaunt for HTML parsing.
    • Apache HttpClient for handling complex HTTP requests.
    • MigLayout to help me organize the Swing GUI.

A Quick Note

Just a heads-up: this is a personal archive. The code is from 2018 and the web has changed a lot since then. The bot will not work on its target sites today without a major overhaul.

I'm keeping it here as a memento of where my software development journey began. It’s a bit messy and a bit naive, but it represents months of passion and problem-solving, and for that, I'll always be proud of it.

About

My very first (serious) project. Worked on it from 9/2017 to 6/2018

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages