AIAPA is a Gemini-driven Amazon product analysis tool currently in the development stage. Although it still needs to be improved, we welcome any problems or suggestions encountered through issues.
This tool can result in a short soft ban! Please consider carefully before using it and set a reasonable task number!
The main function:
Use the get command to obtain product data
Use the analyze command to summarize the advantages and disadvantages of the product
generate product report
- Install nodejs
- Go to Google AI Studio and get an API Key
- type in
npm install aiapa -g
in terminal - type
aiapa start
and enjoy :)
AIAPA can be started from the command line or through a code interface, and supports passing in parameters, calling commands, listening to events, and more.
start with:
aiapa start
or chat(beta) with Gemini
aiapa chat
use .import in conversation to import product data
- Command line startup: enter
aiapa get
to start the task, the sample code is as follows:
aiapa get -q laptop -t 20 -mc 10 -r 5 -o "./output"
Using the --low-ram flag reduces some of the memory usage
Be sure to reserve at least 2GB of memory usage when running
- Code Interface Launch: The sample code is as follows, demonstrating the functions of configuring, running a task, and getting results:
import { app, Commands } from "aiapa";
app.setUserConfig({
query: "laptop",
maxTask: 20,
maxConcurrency: 10,
maxReviews: 5,
output: "./output"
}).load().run(Commands.get);
// Example of getting results
app.run({
...Commands.get,
action: async function(result) {
console.log(result);
}
});
// Custom Selector Registration Example
app.on("beforeCommandRun", (cmd, mod) => {
mod.registerDetailSelector("links", {
querySelector: "a",
evaluate: (el) => el.href
});
}).run(Commands.get);
- Command line startup: Enter
aiapa analyze
to start an analysis task
After startup, you will be asked for the file to be analyzed. This file should be product information generated by the get command that meets the specifications.
Allows using --api-key to pass in multiple api keys to complete the api key pool
for example:
aiapa analyze --api-key AIxxxxxxx AIxxxxxxx2
- Code interface startup: Start from code, you need to pass in the file parameter
import { app, Commands } from "aiapa";
app.setUserConfig({
file: "./laptop-result-2024-03-15_08-51-58.json"
}).load().run(Commands.analyze);
Changed the following features:
- Fixed permission error on windows
This update added the following features:
- chat command
- chat with Gemini
Changed the following features:
- fix null attr problem
- fix permission problems on unix-like systems
- idk, remove herobrine ▬_▬
This update added the following features:
- start command
- auto generate html as result
- add command bin open, this will open the bin dir in your ui (only macos and windows)
Changed the following features:
- fix many problems
- support linux and macos
- better csv
- open file by selecting from ui or typing
- better bin command and bin dir permission check
This update added the following features:
- analyze command
- Support the use of apikey pool
This update added the following features:
- Proxy mode
- Low memory mode
- Page pool
- Useful subcommands for bin (whereis, list)
Changed the following features:
- Added error handling and ban detection
- Added some APIs
- Handled some unexpected crashes
- Fixed the page loading issue
- Optimized speed
Contributions to the AIAPA program are welcome. Please ensure that your use is in accordance with the terms of service of the target site and relevant legal regulations.
AIAPA is published under the MIT license.