This script performs the same behaviors as you buy something on Amazon with a browser.
This script requires PhantomJS and CasperJS. And you need to know about the URL of what you want to buy on Amazon like this: https://www.amazon.co.jp/gp/product/B0054X4H0M/.
$ cat /etc/system-release
Amazon Linux AMI release 2016.3
$ phantomjs --version
2.1.1
$ casperjs --version
1.1.1
- Add what you want to buy to the cart.
- Proceed to checkout.
- Sign in to Amazon.co.jp
- Check the checkbox to say you are over 20 years old
- Place your order.
- Use encrypted credentials: The script deal with the user credentials for Amazon.co.jp as hard-coded parameter values. Yes, your credentials will be on the *.js file. I know it's terrible...
- Refer credentials from an external file or something: Same as above.
- Throw exceptions: If something unexpected like a pop-up says "Would you like to try Amazon Prime?" happened, the script doesn't work correctly and throw any error messages. Just hung-up or time-out.
- Change shipping address
- Use a coupon code
- Choose the express delivery or delivery date
Alice MAKAIMURA
- twitter: @arumumu
- github: /makaimura