Amazon Watch - Auto-Order as soon as an article is available

in #utopian-io6 years ago (edited)

Once in a while, you may want to preorder something on Amazon, you set an Email notification to inform you when it is available again...You get that Email (probably minutes or even hours later) and you open the article link, but it is out of stock again. Since there is no "auto-order on availability" on Amazon, i created Amazon Watch.

Source: https://github.com/ateufel/AmazonWatch

How it works

  • Open the Amazon website (you may want to change that to Amazon.com instead of Amazon.de in Line 22).
  • Go to login form.
  • Enter credentials and login.
  • Open the specified article URL.
  • Activate One Click Buy.
  • Check for the preorder button.
  • If it is there, order the item. If not, reload the page after 5 seconds and check again.

A brief look at some of the Source - it is really straightforward:

Screenshot 2018-05-11 at 13.03.04.png

Technology Stack

The tool is built with Node.js/JavaScript, the only dependency is Puppeteer - a tool to control the Chrome headeless browser in an easy way.

Usage

  • Clone or download the repository - on some server or Raspberry Pi
  • Install packages: yarn install or npm install
  • Set Environment Variables with your Amazon credentials: AW_EMAIL / AW_PASSWORD
  • Start the server with the Amazon Article URL: node index https://www.amazon....
  • Wait...

You can also use pm2 instead, of course: pm2 start index

If you set the headless option in the source to "false", you can watch how the script works. Perfect for testing :)

Future Plans

  • I may implement some notification when the article has been ordered. Not sure if that is really needed, after all you do get an Email from Amazon anyway. I am happy to get tipps to improve it though. Just create an Issue on Github, or comment on this thread if you want to contribute in any way.
  • Right now, you can only watch a single article. Of course you can start several instances with pm2, but putting all article URLs into a JSON file may be an improvement.

My Github Account: https://github.com/ateufel
Amazon Watch: https://github.com/ateufel/AmazonWatch

Sort:  

Hey @luschn
Thanks for contributing on Utopian.
We're already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Thanks for the contribution!

Looks like a useful little tool! For future contributions I would recommend combining more features into one contribution so you can possibly get a higher score, and in turn a higher reward.

A link to the answers of the questionnaire can be found here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Hey @luschn
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.31
TRX 0.12
JST 0.033
BTC 63849.10
ETH 3132.18
USDT 1.00
SBD 3.89