csfd-api
Api for csfd.cz
Last updated 8 months ago by patrikvalkovic .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install csfd-api 
SYNC missed versions from official npm registry.

CSFD

Build Status Coverage Status

csfd.cz API that scraps HTML.

Made by Patrik Valkovič

Install

npm install --save csfd-api

Return values

Every method returns promise

Implemented

Just a few things are implemented for now:

  • Parsing of search results (only movies and people)
  • Parsing of movie info
  • Parsing of person info
  • Partial parsing of TV shows

Usage

Searching for movie:

const csfd = require('csfd-api')
const results = await csfd.search('matrix')
//...
results.films[?] === {
    id: 9499, 
    name: 'Matrix',
}
//...

Getting movie info:

const csfd = require('csfd-api')
const film = await csfd.film(9499)
film === {
    id: 9499,
    imdbId: 'tt0133093',
    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! ...",
    poster: "http://img.csfd.cz/..."
}

TV shows

Library partially allows to parse TV shows information.
It is parsed same way as movie, but since version 1.1.0 output also contain information about type. These properties are null for the movies.

const csfd = require('csfd-api')
const film = await csfd.film(263138)
film === {
    id: 263138,
    imdbId: 'tt0944947',
    title: "Hra o trůny",
    type: "TV seriál",
    length: 3639,
    serialLength: {
        episodes: 67,
        length: 60
    }
}

Roadmap

  • TV show parsing
  • User parsing
  • Comments parsing
  • Parsing of lists

All help and pull requests are welcomed.

License

MIT

Current Tags

  • 1.1.4                                ...           latest (8 months ago)

8 Versions

  • 1.1.4                                ...           8 months ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 9
Dependencies (2)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |