Auto buy products from amazon in just 10 lines of python code

In this post we will see how we can login to amazon and then buy a product using datakund library. Here are steps to follow:-

  1. Install datakund
pip install datakund

2. Import datakund

from datakund.datakund import *

3. Login to amazon

obj=datakund()
amazon=obj.amazon()
amazon.login(password='place password here', email='place email here')

5. Open the product url and then click on buy.

amazon.buy(product_url='product_url')

6. Now select the payment method e.g “Punjab National Bank Debit Card”, “State Bank of India Debit Card”, “Net Banking”,etc.

amazon.select_payment_method(payment_method='Punjab National Bank Debit Card')

> If you selected bank debit or credit card which is saved , then enter the cvv.

amazon.fill_cvv(cvv='cvv')

> If you selected Net Banking then select the bank e.g “Axis Bank”,

amazon.select_bank(bank='Axis Bank')

7. Now call function of place order which will move you to transaction page.

amazon.place_order()

Here is the full code:-