1.6.9 • Published 2 years ago

more4less v1.6.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

more4less

A fast flexible price search engine for various german online shops!

Motivation

Curiosity 🤷‍♂️

Supported online shops:

  • eBay
  • Amazon
  • MediaMarkt
  • MediMax
  • Mindfactory
  • Saturn
  • Cyberport
  • Proshop.de
  • Otto.de
  • Alternate
  • Kaufland
  • Clevertronic
  • Bücher.de

Installation

npm i more4less

Importing

TypeScript

import * as more4less from "more4less";

import { AmazonPriceSearchEngine, EbayPriceSearchEngine } from 'more4less'; // Individual classes

JavaScript

const more4less = require("more4less");

const { EbayPriceSearchEngine } = require('more4less'); // Individual classes

Examples

Search on a single shop

import * as more4less from "more4less";

const ebay = new more4less.EbayPriceSearchEngine();

(async () => {
    const getProduct = await ebay.search("alexa firestick");
    console.log(getProduct);
})();


// or

import { SearchEngineFactory } from "more4less";

const engine = new SearchEngineFactory().GetSearchEngine("Amazon");

(async () => {
    const getProduct = await engine.search("alexa firestick");
    console.log(getProduct);
})();

Search on all supported shops

import * as more4less from "more4less";

const engine = new SearchEngineFactory().GetSearchEngine("All");

(async () => {
    const getProduct = await engine.search("alexa firestick");
    console.log(getProduct);
})();

Search on multiple shops

import * as more4less from "more4less";

const searchEngines = new more4less.SearchEngineList([new more4less.EbayPriceSearchEngine(), new more4less.AmazonPriceSearchEngine2()]);

(async () => {
    const getProduct = await searchEngines.search("alexa firestick");
    console.log(getProduct);
})();

Storing the Output

There are two ways of saving the output, either as JSON or CSV

import * as more4less from "more4less";

const searchEngines = new more4less.SearchEngineList([new more4less.EbayPriceSearchEngine(), new more4less.AmazonPriceSearchEngine2()]);
const output = new more4less.JSONOutput("test.json") // path and filename

(async () => {
    const getProduct = await searchEngines.search("alexa firestick");
    output.outputData(getProduct);
})();

Result template

// Each price engine provides the follwoing results:

interface ISearchResult {
    engine: string;
    link: string;
    name: string;
    rating: number;
    price: number;
    thumbnail: string;
}

Contributions

Software contributions are welcome. If you are not a dev, testing and reproting bugs can also be very helpful!

Questions?

Please open an issue if you have questions, wish to request a feature, etc.

1.6.9

2 years ago

1.6.8

2 years ago

1.6.7

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.9

2 years ago

1.5.8

2 years ago

1.5.7

2 years ago

1.5.6

2 years ago

1.5.5

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago