Socket
Socket
Sign inDemoInstall

more4less

Package Overview
Dependencies
22
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    more4less

A price search engine for various german online shops


Version published
Weekly downloads
1
Maintainers
1
Install size
3.16 MB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 27 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc