Python 3 implementation of d3stryr-3stripes
Python 3.5.2 - https://www.python.org/downloads/
Required modules: selenium, requests, virtualenv (optional - but is used in the instructions)
If you don't have virtualenv and want to be able to follow the directions completely then install it with:
pip3 install virtualenv
If you don't have pip3 already installed then install it with (assuming you have Python 3.5.x installed):
chromedriver - https://sites.google.com/a/chromium.org/chromedriver/
Neededed to drive Chrome. Download the appropriate version for your OS.
Windows users: place the
chromedriver.exefile in the
binfolder OR in
Mac/Linux users: place the
chromedriverfile in the
Either use git to clone this repository or click on "Download Zip"
Navigate to the
d3stryr-3stripes-masterfolder depending on what you did in step 1.
I will assume that if you are using
git clonethen you already know how to navigate to the appropriate folder. For everyone else, unzip
d3stryr-3stripes-master.zip. Then move the folder into your home directory. Then open up a terminal window and type the following to navigate to the
Create a virtual environment (only needs to be done once per install):
virtualenv -p python3 --no-site-packages env
Activate the virtual environment (needs to be done for once for an active session in your terminal):
Install the requirements (needs to be done once per install):
pip3 install -r requirements.txt
That is all that is needed to install.
The only file that needs to be modified is
config.cfg.sample. Rename it to
config.cfg and read CONFIG.md
If you are starting from a new terminal and the
d3stryr-3stripes-master folder is in your home directory then navigate (change into) the
Make sure you have activated the virtual environment:
Then you are ready to run:
- The script will look up the either the Variant endpoint for inventory or the Client endpoint for inventory (or it may do both - with Client stock being used for the remainder of the run).
- The script will cycle through your size list and check to see if inventory value is greater than 0.
- If inventory is available it will attempt to cart that size.
processCaptcha = Truethen the script will attempt to get a captcha token.
- The script then builds the payload for the necessary add-to-cart request.
- If the response is successful then the script will open up a Chrome browser and attempt to transfer the session over.
- Chrome will try to access the main locale page first. Then waits several seconds and then navigates to the Cart-Show page.
- If you get an empty Cart-Show page but the basket in the upper-right has a "1" showing then refresh the page once using (CTRL-R or CMD+R)
- If nothing appears then quit the browser and move on to the next pair because any further refreshing will result in a soft-ban.
- Interface w/ a MySQL DB for token harvesting locally.
- Auto-checkout. I much prefer 10,000 people getting a pair versus 1,000 people getting 10 pairs.
If the command
pip3 install virtualenvdoes not work then you will need to install pip3. More than likely the command will be:
If that doesn't work then Google "how to install pip3 python3" for your OS.
If you get a browser window with "data;" as the URL then you will need to download the latest chromedriver version for your OS. See the instructions at the top of this README.
- Variant Inventory vs. Client Inventory - Client inventory provides the latest inventory for a given product (provided that the clientId is correct). The variant inventory does not reflect the latest inventory numbers - it has been observed to reflect the inventory on product release.