Skip to content

ShoeBot is a tool that automatically checks Shopify websites for products and buys them for you. It looks for items based on keywords and size, adds them to your cart, and finishes the checkout process.

Notifications You must be signed in to change notification settings

shubham170102/shoebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ShoeBot - Automated Shoe Purchase Bot

ShoeBot is an automated script that checks for availability and attempts to purchase shoes from a Shopify-based website. The bot continuously scans a specific product page for a given keyword and size. Once it detects the shoe is available, it adds the item to the cart and proceeds to checkout automatically.

Features

  • Checks availability of specific products on Shopify websites.
  • Supports scanning for a keyword in product listings.
  • Automatically selects the available shoe size.
  • Adds the product to the cart.
  • Automates the checkout process using shipping and payment details.

Prerequisites

Before using the ShoeBot, ensure you have the following installed:

Setup and Installation

  1. Clone the repository or download the project files to your local machine.
git clone https://github.com/shubham170102/shoebot.git
cd shoebot
  1. Install the required NuGet packages. Open your terminal in the project directory and run:
dotnet add package Newtonsoft.Json
dotnet add package Nito.AsyncEx
dotnet add package Selenium.WebDriver
dotnet add package Selenium.WebDriver.ChromeDriver
dotnet add package RestSharp
  1. Ensure ChromeDriver is installed and added to your system's PATH so Selenium can launch Chrome.

Configuration

Before running the bot, you need to configure the following parameters in the code:

  • Website URL: In the Main method, update the website and category variables to point to the correct Shopify store and category.
var website = "nrml.ca";            // Replace with your target website
var category = "/collections/footwear"; // Update with the correct product category
  • Keyword: Update the Keyword variable with the specific product you want to search for.
string Keyword = "CDG"; // Replace with the product name or brand you are looking for
  • Shoe Size: If you are looking for a specific size, update the size variable.
var size = "8";  // Replace with the shoe size you are searching for
  • User Details for Checkout: Update the BuyAsync method with your own shipping and billing details.
new KeyValuePair<string, string>("checkout[shipping_address][first_name]", "Shoe"),
new KeyValuePair<string, string>("checkout[shipping_address][last_name]", "Bot"),
new KeyValuePair<string, string>("checkout[email]", "shoebot0@gmail.com"),
new KeyValuePair<string, string>("checkout[shipping_address][phone]", "450-443-0358"),
new KeyValuePair<string, string>("checkout[shipping_address][address1]", "6400 Boulevard Taschereau"),
new KeyValuePair<string, string>("checkout[shipping_address][city]", "Brossard"),
new KeyValuePair<string, string>("checkout[shipping_address][zip]", "J4W3J2")

Usage

Run the Program:

Once you've updated the configuration, run the bot by executing the following command:

dotnet run

Monitoring Product Availability

The bot will monitor the Shopify store for the specified product. When it finds a product matching your keyword, it will check if the specified size is available.

Auto Add to Cart and Checkout

If the product is available, the bot will add it to the cart and proceed to checkout, automatically filling in the necessary details like shipping and payment information.

Payment

The bot will generate the payment token and attempt to process the payment. If successful, it will display a success message in the terminal.

How It Works

Product Availability Check:

The bot sends a GET request to the Shopify store’s product API endpoint (e.g., /products.json). It retrieves the available products and checks for the specified keyword (e.g., a product name or brand like "CDG").

Shoe Size Availability:

After finding the product, it checks the available variants (such as sizes) to see if your desired size is in stock.

Add to Cart:

Once the product and size are found, it sends a POST request to the Shopify cart endpoint to add the product.

Checkout:

The bot proceeds to the checkout page and fills in the required details for shipping, contact information, and payment, automating the process entirely.

Completion:

The bot will either confirm the purchase or handle errors like declined payments, out-of-stock notices, or other processing issues.

Customization

  • Additional Products: To search for multiple keywords or products, you can expand the logic in the Main method to loop over an array of keywords.

  • Multi-size Support: If you want to search for multiple sizes, modify the bot to loop through a list of sizes and attempt to purchase the first available size.

Important Notes

  • Bot Limitations: Some Shopify stores use CAPTCHA and other anti-bot technologies. This bot does not include CAPTCHA solving, so it may not work on all websites.

  • Legal Considerations: Ensure you have permission to use automation tools on e-commerce websites. Some stores have policies against bots and may block your IP or account.

Troubleshooting

  • Bot Not Finding Products: Ensure the website's category and product data are accessible via the API and that the keyword is spelled correctly.

  • Errors During Checkout: Check if the shipping or billing details are filled correctly and ensure that the website hasn't changed its checkout process.

About

ShoeBot is a tool that automatically checks Shopify websites for products and buys them for you. It looks for items based on keywords and size, adds them to your cart, and finishes the checkout process.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages