This is a bot that can be used to check out an Amazon food cart. Particularly useful in the time of covid. This is probably not super condoned by Amazon, so use at your own risk :)
# install.packages("devtools")
devtools::install_github("aedobbyn/foodpls")
data-raw/cookies_template.csv
and
change the file name to data-raw/cookies.csv
EMAIL
AMAZON_PASS
e.g.
Sys.setenv(EMAIL="ratatouille@gmail.com")
There are three main functions in this package.
get_in
: logs you incheck_out
: checks out your cart and navigates you to the page
where you would select a delivery time if one is availablebuy
: selects the first available delivery time if it’s available.
If it’s not, it keeps refreshing the page until a certain number of
tries is reached or a time limit is reached, or both.run
evaluates all of these in order.
library(foodpls)
There are two carts to choose from: "whole foods"
or "amazon fresh"
.
run(cart = "whole foods")
The ...
args to run
are passed to buy
.
run(cart = "amazon fresh", n_tries = 3, sleep_time = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.