Giter Site home page Giter Site logo

martinus-scrape's Introduction

#Martinus-scrape

Martinus-scrape is a package that lets you download book data from Martinus.sk online bookshop.

You can call getBook with any search term you want, but if you want to search for ISBNs, use normalizeISBN, because the search engine only accepts ISBNs without dashes.

##Usage

var m = require("martinus-scrape")
m.getBook(m.normalizeISBN("80-7145-606-3"), function(err, book) {
	if(!err) {
		console.log(book)
	}
});

prints

[ { title: 'Pán Prsteňov - kolekcia I. II. III.',
    authors: ['J.R.R. Tolkien'],
    publisher: 'Slovart',
    ISBN: '8071456063',
    pubYear: 2002,
    description: *The description of the book*,
    price: 44.85,
    pages: 1243,
    imageUrl: 'http://martinus.sk/data/tovar/_l/11/l11304.jpg',
    url: 'http://www.martinus.sk/?uItem=11304' },
  { title: 'Pán Prsteňov I. - Spoločenstvo Prsteňa',
    authors: ['J.R.R. Tolkien'],
    publisher: 'Slovart',
    ISBN: '8071456063',
    pubYear: 2001,
    description: *The description of the book*,
    price: 14.95,
    pages: 454,
    imageUrl: 'http://martinus.sk/data/tovar/_l/9/l9687.jpg',
    url: 'http://www.martinus.sk/?uItem=9687' } ]

##Limitations Martinus-scrape only downloads the first 20 search results (the first page). Its intended use is in collection management software, where you know pretty well what you're searching for, so I don't think any more are needed. Anyway, since Martinus.sk has no public API and this is just an HTML scraper, I'm not sure any other use would even be legal.

martinus-scrape's People

Contributors

selverob avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.