Skip to content

This is a fast and easy Amazon product analysis tool that crawls product information and analyzes it with AI through automated scripts, ultimately generating product reports.

License

Notifications You must be signed in to change notification settings

helloyork/aiapa

Repository files navigation

AIAPA - AI Analysis of Products on Amazon

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

Instruction

Quick Start

  1. Install nodejs
  2. Go to Google AI Studio and get an API Key
  3. type in npm install aiapa -g in terminal
  4. 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

Example of using the Get command

  • 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);

Analyze command usage example

  • 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);

Update

2024/8/31

Changed the following features:

  1. Fixed permission error on windows

2024/3/25

This update added the following features:

  1. chat command
  2. chat with Gemini

Changed the following features:

  1. fix null attr problem
  2. fix permission problems on unix-like systems
  3. idk, remove herobrine ▬_▬

2024/3/21

This update added the following features:

  1. start command
  2. auto generate html as result
  3. add command bin open, this will open the bin dir in your ui (only macos and windows)

Changed the following features:

  1. fix many problems
  2. support linux and macos
  3. better csv
  4. open file by selecting from ui or typing
  5. better bin command and bin dir permission check

2024/3/15

This update added the following features:

  1. analyze command
  2. Support the use of apikey pool

2024/3/5

This update added the following features:

  1. Proxy mode
  2. Low memory mode
  3. Page pool
  4. Useful subcommands for bin (whereis, list)

Changed the following features:

  1. Added error handling and ban detection
  2. Added some APIs
  3. Handled some unexpected crashes
  4. Fixed the page loading issue
  5. Optimized speed

Contributions and Licenses

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.

About

This is a fast and easy Amazon product analysis tool that crawls product information and analyzes it with AI through automated scripts, ultimately generating product reports.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published