/csfd-api

API for csfd in JavaScript

Primary LanguageHTMLMIT LicenseMIT

CSFD

Build Status Coverage Status

csfd.cz API that scrap HTML.

Made by Patrik Valkovič

Install

npm install --save csfd-api

Methods

Every method return promise

Implemented

Just a few things are implement now:

  • Parsing of search results (only films and people)
  • Parsing of info about film
  • Parsing of info about person

Usage

Searching for film:

var csfd = require('csfd')
const results = await csfd.search('matrix')

...
results.films[?] === {
    id: 9499, 
    name: 'Matrix',
}
...

Get info about film:

var csfd = require('csfd')
const film = await csfd.film(9499)
film === {
    id: 9499,
    title: "Matrix",
    titles: [
        {language:"USA", title:"The Matrix"},
        {language:"Slovensko",title:"Matrix"},
    ],
    genre:["Akční","Sci-Fi"],
    shotPlaces:["USA"],
    year:1999,
    length:131,
    score:90,
    directors:[
        {id:3112,name:"Lilly Wachowski"},
        {id:3113,name:"Lana Wachowski"}],
    "screenplay":[
        {id:3112,name:"Lilly Wachowski"},
        {id:3113,name:"Lana Wachowski"}
    ],
    music:[{id:63014,name:"Don Davis"}],
    actors:[
        {id:46,name:"Keanu Reeves"},
        //...
        ],
    content: "Uvěříte neuvěřitelnému! ..."
}

Roadmap

  • Serial parsing
  • Users parsing
  • Comments parsing
  • Parsing of ranking

All help and pull requests are welcome.

License

MIT