Skip to content

Commit

Permalink
Merge pull request #449 from Hari-Nagarajan/hotfix
Browse files Browse the repository at this point in the history
Hotfix 0.5.4
  • Loading branch information
DakkJaniels authored Dec 25, 2020
2 parents 144983f + f89d09e commit 0b0b0d6
Show file tree
Hide file tree
Showing 6 changed files with 360 additions and 89 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

We built this in response to the severe tech scalping situation that's happening right now. Almost every tech product that's coming
out right now is being instantly brought out by scalping groups and then resold at at insane prices. $699 GPUs are being listed
for $1700 on eBay, and these scalpers are buying 40 carts while normal consumers can't get a single one. Preorders for the PS5 are
for $1700 on eBay, and these scalpers are buying 40 cards while normal consumers can't get a single one. Preorders for the PS5 are
being resold for nearly $1000. Our take on this is that if we release a bot that anyone can use, for free, then the number of items
that scalpers can buy goes down and normal consumers can buy items for MSRP.

Expand All @@ -19,6 +19,8 @@ Read through this document and the cheat sheet linked in the next sections. See
## Installation

Easy_XII has created a great cheat sheet for getting started, [please follow this guide](https://docs.google.com/document/d/1grN282tPodM9N57bPq4bbNyKZC01t_4A-sLpzzu_7lM/).
**Note:** that we do not control the contents of this document, so use some common sense when configuring the bot. Do not ask us
why the bot does not purchase an $8.49 item when the minimum purchase price is set to $10 in the configuration file that YOU are supposed to update

This project uses [Pipenv](https://pypi.org/project/pipenv/) to manage dependencies. Hop in my [Discord](https://discord.gg/qDY2QBtAW6) if you have ideas, need help or just want to tell us about how you got your new toys.

Expand All @@ -31,6 +33,8 @@ pipenv shell
pipenv install
```

NOTE: YOU SHOULD RUN `pipenv shell` and `pipenv install` ANY TIME YOU UPDATE, IN CASE THE DEPENDENCIES HAVE CHANGED!

Run it
```
python app.py
Expand All @@ -57,7 +61,9 @@ Best Buy has been deprecated, see details below.
### Amazon
The following flags are specific to the Amazon scripts. They the `[OPTIONS]` to be passed on the command-line to control
the behavior of Amazon scanning and purchasing. These can be added at the command line or added to a batch file/shell
script (see `_Amazon.bat` in the root folder of the project).
script (see `_Amazon.bat` in the root folder of the project). **NOTE:** `--test` flag has been added to `_Amazon.bat` file by
default. This should be deleted after you've verified that the bot works correctly for you. If you don't want your `_Amazon.bat`
to be deleted when you update, you should rename it to something else.

**Amazon flags**

Expand Down Expand Up @@ -93,6 +99,13 @@ Options:
none
--p TEXT Pass in encryption file password as argument
--log-stock-check Will log each stock check to terminal and log file
--shipping-bypass Bot will attempt to click "Ship to this Address" button,
if it pops up during checkout.
USE THIS OPTION AT YOUR OWN RISK!!!
NOTE: There is no functionality to choose payment
option, so bot may still fail during checkout
--help Show this message and exit.
```

Expand Down
27 changes: 26 additions & 1 deletion cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
from functools import wraps
from signal import signal, SIGINT

import click
try:
import click
except ModuleNotFoundError:
print(
"You should try running pipenv shell and pipenv install per the install instructions"
)
print("Or you should only use Python 3.8.X per the instructions.")
print("If you are attempting to run multiple bots, this is not supported.")
print("You are on your own to figure this out.")
exit(0)
import time

from notifications.notifications import NotificationHandler, TIME_FORMAT
Expand Down Expand Up @@ -126,6 +135,18 @@ def main():
default=None,
help="Pass in encryption file password as argument",
)
@click.option(
"--log-stock-check",
is_flag=True,
default=False,
help="writes stock check information to terminal and log",
)
@click.option(
"--shipping-bypass",
is_flag=True,
default=False,
help="Will attempt to click ship to address button. USE AT YOUR OWN RISK!",
)
@notify_on_crash
def amazon(
no_image,
Expand All @@ -141,6 +162,8 @@ def amazon(
disable_sound,
slow_mode,
p,
log_stock_check,
shipping_bypass,
):

notification_handler.sound_enabled = not disable_sound
Expand All @@ -159,6 +182,8 @@ def amazon(
slow_mode=slow_mode,
encryption_pass=p,
no_image=no_image,
log_stock_check=log_stock_check,
shipping_bypass=shipping_bypass,
)
try:
amzn_obj.run(delay=delay, test=test)
Expand Down
Loading

0 comments on commit 0b0b0d6

Please sign in to comment.