-
Ensure python3, pipenv, and the latest Chrome version are installed.
-
git clonethe repository and enter it. -
Run
pipenv installto install the virtual environment. -
Run
pipenv shellto activate the virtual environment. -
Run
python gen_cookie.pyto generate cookies.- This will open up a browser window.
- Login into Newegg. Once logged in, wait for the page to completely stop loading.
- In the Python shell prompt, click any button to save your cookies.
-
Copy or move all json files in
configs-default/toconfigs/. -
Edit the
configs/billing_config.jsonfile. This should match with your default Newegg card. Follow the format specified exactly. Forcard_provider, we have confirmed the following possible entries: Mastercard, Visa, Discover, AmericanExpress -
Edit the
configs/jobs_config.jsonfile. Add more jobs to the array as you wish. All the jobs in this file will be run concurrently when the script is launched, so be careful about adding too many. Make sure each entry has a different job name. Theattemptsattribute is how many times to run that job before it is officially marked as a failed job. -
Edit the
configs/product_config.jsonfile.- If you are using combos, set
is_comboto true. For combos, the URL of the Newegg page looks like this: https://www.newegg.com/Product/ComboDealDetails?ItemList=Combo.4212056. Thep_idis the portion after Combo., so in this case it would be 4212056. Thes_idis thep_idof the highest-value product in the combo; in this case, thep_idof the Intel CPU. Read the next bullet point for info on how to get this. - If you are not using a combo, set
is_comboto false. For single items, the URL looks like this: https://www.newegg.com/amd-ryzen-5-5600x/p/N82E16819113666. Thep_idis the last portion, so in this case, it is N82E16819113666. Thes_idis the last 8 digits of thep_id, hyphenated. In this case thes_idwould be 19-113-666.
- If you are using combos, set
-
Edit the
configs/settings_config.jsonfile. Theatc_limitis how many attempts to try to add to cart before failing. Similar for the other _limit variables. The timeout variable is the timeout for each request. If a request exceeds that time (in seconds) then it will fail. Thecookie_fileis the name of the cookie file you would like to use. Unless you manually changed this, it should stay ascookies.json. -
Now, you can run the program. I recommend only running when there is a drop coming. For example, if there is a drop at 7 PM, generate your cookies at 6:55 PM. Then, run the actual script (described in the next step) at exactly 7 PM. The reason you need to generate fresh cookies is because they expire after an hour.
-
To run the script in test mode (all steps are completed except for order submission), run
python cli.py jobs_config.json --test. To run the script in real mode (order is actually submitted), runpython cli.py jobs_config.json --real. Feel free to make different job configurations for both your test and real modes. Running with no parameter will default the program to test mode. -
The script will provide output on what it is doing once you run it.
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|