Giter VIP home page Giter VIP logo

helloyork / aiapa Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 512 KB

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.

Home Page: https://www.npmjs.com/package/aiapa

License: MIT License

JavaScript 90.59% TypeScript 6.69% Handlebars 2.71%
amazon-scraper amazon-scraping amazon-scraping-library ai ai-analysis scraping

aiapa's Introduction

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.

aiapa's People

Contributors

helloyork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pa-0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.