Skip to content

Check the stock of a specific Micro Center product. Optionally, securely link your email to get notified when your selected product is in stock.

License

Notifications You must be signed in to change notification settings

brianabouchard/StockSmart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro Center Stock Application (MCSA) v1.0.1

Licensed with Apache 2.0 - Check the LICENSE file in the main branch for more information

Check the stock of a specific Micro Center product. Optionally, securely link your email to get notified when your selected product is in stock.

Installation

**Note: The default code looks for an AMD Ryzen 7 9800X3D at a Micro Center Store in Dallas, TX

Step-by-step instructions for setting up the project:

  1. Clone the repository:

    git clone https://github.com/ayoTyler/Micro-Center-Stock-Application.git

    *Alternatively: If you choose to download the .zip from GitHub:
    1. Extract the files to a folder using 7zip or WinRAR
    2. Open the MCSA.py application in a Python-supported IDE. (I recommend PyCharm Community Edition)

  2. Open the command console/terminal window within your IDE. Change directory (cd) to the project folder's location (if needed) and run the following:

    pip install -r requirements.txt

    *Alternatively: To use your system's command console/terminal window to install the items listed within the requirements folder:
    1. Change directory (cd) to the project folder's location that contains requirements.txt
    2. Run the above command

  3. On Line 23 within the code, replace the Store Identification Number with your local Micro Center Store Identification Number:

    # Line 23
    'value': 'store number here',

    To find your local Micro Center Store Number:
    1. Make sure you have selected a store on www.microcenter.com
    2. Right-Click the page, choose 'Inspect'
    3. Click the double arrow (>>) at the top of the Inspect Element console and select 'Application'
    4. Under 'Storage', click 'Cookies'
    5. Under the 'Name' column, look for 'storeSelected' and find the appropriate value associated with that cookie.
    6. Replace the number on Line 23 in the code with the appropriate Store Identification Number as shown in the example below.
    # Example
    # Line 23
    'value': '131',

  4. On Line 30 within the code, replace the Product Page URL with your desired product:

    # Line 30 - Get the product page URL
    driver.get("https://www.microcenter.com/your-product-url-here")

  5. (Optional) Adjust the speed that the program functions:

    Slower Internet = Higher Number (~30)

    # Line 18 & Line 33 - Wait for the page to load, 
    # adjust as needed (seconds)
    time.sleep(30)

    Faster Internet = Lower Number (~5)

    # Line 18 & Line 33 - Wait for the page to load, 
    # adjust as needed (seconds)
    time.sleep(5)

    It is NOT recommended to set the number below 5.

  6. (Optional) When you run the program, follow the instructions in the terminal/run console to securely connect your email to the application.

    When linked, this application sends you an alert email when your desired product is in stock. Otherwise, the program will run normally and notify you via the terminal/run console.

    To securely link your email, follow the instructions in the terminal/run console or the instructions below:
    1. Go to myaccount.google.com
    2. Search 'App Passwords' and click the respective option
    3. In the 'App name' field, enter any title specific to this program
    4. Copy and paste the newly generated password into the appropriate fields given to you in the terminal/run console
    5. Enter your email
    6. Enter your password
    7. Expect to receive a test email from yourself confirming that your email is linked with the application

That's all! Leave the program running in the background. If you shut down the computer, be sure to run through the steps again to get it working again.

Future Update Plans

  1. Show and email the amount in stock
  2. GUI window
  3. Multiple Micro Center stores listed - no code-changing required
  4. Works for other websites

If this program helped you, buy me a coffee :)

https://buymeacoffee.com/ayotyler < - - - - - - - - - - - - - - - - -

About

Check the stock of a specific Micro Center product. Optionally, securely link your email to get notified when your selected product is in stock.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%