drawrowfly / amazon-product-api

Amazon Scraper. Scrape products from the amazon search result or reviews from the specific product
631 stars 181 forks source link

[Feature request] Print output as json when using CLI (instead of creating file) #13

Closed vesper8 closed 3 years ago

vesper8 commented 3 years ago

Hi there, first of all thanks a lot for making this, it's very well made and extremely useful. I'm going to be creating a few feature requests if you don't mind.

The first is that I would prefer if I could pass an argument on the CLI so that the return value is printed out instead of having a file created. This is because this CLI call is being called programatically from a PHP script and it makes it much easier to store the output inside a database then having to have a file created, figure out the filename, then read the file's content and store that in a database, and then delete the file

I imagine adding a new flag such as --output cli / file (default file) would be very simple

Thank you!

drawrowfly commented 3 years ago

Hello,

Ok, i think it will be useful

drawrowfly commented 3 years ago

--filetype '' and data will be displayed in the terminal in Raw format