amazon-auto-buy-bot

1.0.4 • Public • Published

Amazon-Auto-Buy-Bot is a Node Js package to buy product on amazon automatically using browser automation. It currently runs only on windows.

Installation

npm install amazon-auto-buy-bot

Example 1

In this example we first import package, then we login with cookies, then we buy product using credit/debit cards.

var amazon=require("amazon-auto-buy-bot");

function place_order(){
	amazon.place_order(function(){console.log("Done")})
}

function fill_the_cvv(){
	amazon.fill_cvv("123",place_order)
}
function select_the_payment_method(){
	amazon.select_payment_method("State Bank of India",fill_the_cvv)
}
function buy_product(){
amazon.buy("https://www.amazon.in/Sony-WI-C200-Wireless-Neck-Band-Headphones/dp/B07S13PJ3W/ref=sr_1_20?dchild=1&keywords=earbuds&qid=1613626538&sr=8-20",select_the_payment_method)
}
var cookie_list=[
{
    "domain": ".amazon.in",
    "expirationDate": 1644925588.404523,
    "hostOnly": false,
    "httpOnly": false,
    "name": "i18n-prefs",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "INR",
    "id": 1
}]
amazon.login_cookie(cookie_list,buy_product)

Example 2

In this example we first import package, then we login with cookies, then we buy product using net banking.

var amazon=require("amazon-auto-buy-bot");
function place_order(){
	amazon.place_order(function(){console.log("Done")})
}

function select_the_bank(){
	amazon.select_bank("Axis Bank",place_order)
}
function select_the_payment_method(){
	amazon.select_payment_method("Net Banking",select_the_bank)
}
function buy_product(){
amazon.buy("https://www.amazon.in/Sony-WI-C200-Wireless-Neck-Band-Headphones/dp/B07S13PJ3W/ref=sr_1_20?dchild=1&keywords=earbuds&qid=1613626538&sr=8-20",select_the_payment_method)
}
var cookie_list=[
{
    "domain": ".amazon.in",
    "expirationDate": 1644925588.404523,
    "hostOnly": false,
    "httpOnly": false,
    "name": "i18n-prefs",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "INR",
    "id": 1
}]
amazon.login_cookie(cookie_list,buy_product)

Youtube Video

DataKund

datakund is needed for browser automation. As soon as this package is imported in code, automated browser will open up in which product will be bought. To buy first login will need to be done. Login can be done either with credentials or via cookies

Import

var amazon=require("amazon-auto-buy-bot");

Login with credentials

amazon.login(login_url,username,password)

Login with cookies

amazon.login_cookie(cookie_list)

Click on Buy buttom

amazon.buy(product_url)

Select Payment Method

amazon.select_payment_method('payment_method')

Fill Cvv

amazon.fill_cvv('cvv')

Select Bank

amazon.select_bank('bank name')

Place order

amazon.place_order()

Cookies

To login with cookies Edit this Cookie Extension can be added to browser

Contact Us

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i amazon-auto-buy-bot

    Weekly Downloads

    1

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    3.96 kB

    Total Files

    3

    Last publish

    Collaborators

    • datakund