-
Amazon is likely blocking non browser traffic, I tried adding User-Agent in the headers but it did not work for me.
-
With Puppeteer I can run DOM queries, so I don't have to use a separate html parser.
- Commander provides a clean and extensible API to build CLI commands, promoting scalability and maintaining code cleanliness. plus it is very easy to add subcommands, if required in future.
Install Dependencies
npm i
Compile Typescript
npm run build
To get a list of all the commands and options
node dist/main.js --help
Npm script is also available if you prefer
npm run search -- --help
An example usage would be like
node dist/main.js --sort rating --desc cookies
Advanced example
node dist/main.js --sort rating --desc --prime --limit 5 cookies
- Stream results as soon as they get parsed
- Pagination options
- Option to search in different countries like amazon.in