node-csfd-api 3.3.0 → 4.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +317 -209
- package/dto/movie.d.mts +4 -2
- package/dto/movie.d.ts +4 -2
- package/dto/options.d.mts +9 -0
- package/dto/options.d.ts +9 -0
- package/dto/user-ratings.d.mts +2 -2
- package/dto/user-ratings.d.ts +2 -2
- package/fetchers/fetch.polyfill.js +0 -2
- package/fetchers/fetch.polyfill.js.map +1 -1
- package/fetchers/index.js +1 -1
- package/fetchers/index.js.map +1 -1
- package/fetchers/index.mjs +1 -1
- package/fetchers/index.mjs.map +1 -1
- package/helpers/cinema.helper.js.map +1 -1
- package/helpers/cinema.helper.mjs.map +1 -1
- package/helpers/creator.helper.js.map +1 -1
- package/helpers/creator.helper.mjs.map +1 -1
- package/helpers/global.helper.js.map +1 -1
- package/helpers/global.helper.mjs.map +1 -1
- package/helpers/movie.helper.js +57 -0
- package/helpers/movie.helper.js.map +1 -1
- package/helpers/movie.helper.mjs +57 -1
- package/helpers/movie.helper.mjs.map +1 -1
- package/helpers/search-user.helper.js +0 -2
- package/helpers/search-user.helper.js.map +1 -1
- package/helpers/search.helper.js.map +1 -1
- package/helpers/search.helper.mjs.map +1 -1
- package/helpers/user-ratings.helper.js.map +1 -1
- package/helpers/user-ratings.helper.mjs.map +1 -1
- package/helpers/user-reviews.helper.js.map +1 -1
- package/helpers/user-reviews.helper.mjs.map +1 -1
- package/index.d.mts +15 -15
- package/index.d.ts +15 -15
- package/index.js +23 -16
- package/index.js.map +1 -1
- package/index.mjs +23 -16
- package/index.mjs.map +1 -1
- package/package.json +3 -3
- package/services/cinema.service.d.mts +2 -1
- package/services/cinema.service.d.ts +2 -1
- package/services/cinema.service.js +2 -4
- package/services/cinema.service.js.map +1 -1
- package/services/cinema.service.mjs +2 -2
- package/services/cinema.service.mjs.map +1 -1
- package/services/creator.service.d.mts +2 -1
- package/services/creator.service.d.ts +2 -1
- package/services/creator.service.js +2 -4
- package/services/creator.service.js.map +1 -1
- package/services/creator.service.mjs +2 -2
- package/services/creator.service.mjs.map +1 -1
- package/services/movie.service.d.mts +2 -1
- package/services/movie.service.d.ts +2 -1
- package/services/movie.service.js +15 -17
- package/services/movie.service.js.map +1 -1
- package/services/movie.service.mjs +16 -16
- package/services/movie.service.mjs.map +1 -1
- package/services/search.service.d.mts +2 -1
- package/services/search.service.d.ts +2 -1
- package/services/search.service.js +8 -9
- package/services/search.service.js.map +1 -1
- package/services/search.service.mjs +9 -8
- package/services/search.service.mjs.map +1 -1
- package/services/user-ratings.service.d.mts +2 -1
- package/services/user-ratings.service.d.ts +2 -1
- package/services/user-ratings.service.js +4 -6
- package/services/user-ratings.service.js.map +1 -1
- package/services/user-ratings.service.mjs +4 -4
- package/services/user-ratings.service.mjs.map +1 -1
- package/services/user-reviews.service.d.mts +2 -1
- package/services/user-reviews.service.d.ts +2 -1
- package/services/user-reviews.service.js +4 -6
- package/services/user-reviews.service.js.map +1 -1
- package/services/user-reviews.service.mjs +4 -4
- package/services/user-reviews.service.mjs.map +1 -1
- package/vars.js +17 -7
- package/vars.js.map +1 -1
- package/vars.mjs +17 -8
- package/vars.mjs.map +1 -1
- package/_virtual/rolldown_runtime.js +0 -25
package/README.md
CHANGED
|
@@ -1,52 +1,103 @@
|
|
|
1
1
|
[](https://badge.fury.io/js/node-csfd-api)
|
|
2
|
-
[](https://www.npmjs.com/node-csfd-api)
|
|
3
3
|
[](https://github.com/bartholomej/node-csfd-api/actions)
|
|
4
|
-
[](https://codecov.io/gh/bartholomej/node-csfd-api)
|
|
5
|
+
[](https://www.npmjs.com/node-csfd-api)
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
<div align="center">
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
# CSFD API 🎬 2025
|
|
10
|
+
|
|
11
|
+
#### Modern TypeScript NPM library for scraping **Czech Movie Database (csfd.cz)** _(unofficial)_
|
|
12
|
+
|
|
13
|
+
[Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start) • [API Reference](#-api-reference) • [Examples](#-usage-examples) • [Docker](#-docker-support)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ✨ Features
|
|
20
|
+
|
|
21
|
+
- 🎯 **Type-safe** - Full TypeScript support with type definitions
|
|
22
|
+
- 🧪 **Well-tested** - ~100% code coverage
|
|
23
|
+
- 🚀 **Universal** - Works in Node.js, browsers, and serverless environments
|
|
24
|
+
- 🐳 **Docker ready** - Pre-built Docker images available
|
|
25
|
+
- 🔄 **Modern API** - Promise-based with async/await support
|
|
26
|
+
- 📦 **One dependency** - Lightweight and efficient
|
|
27
|
+
|
|
28
|
+
### Supported Platforms
|
|
29
|
+
|
|
30
|
+
- Node.js (ESM & CommonJS)
|
|
31
|
+
- Browsers (with CORS considerations)
|
|
32
|
+
- Docker containers
|
|
33
|
+
- Serverless (Firebase Functions, AWS Lambda, CloudFlare Workers, etc.)
|
|
34
|
+
- Chrome Extensions
|
|
35
|
+
- React Native (Yes, with Expo too!)
|
|
36
|
+
|
|
37
|
+
## 📦 Installation
|
|
24
38
|
|
|
25
39
|
```bash
|
|
26
40
|
npm install node-csfd-api
|
|
27
41
|
# yarn add node-csfd-api
|
|
42
|
+
# pnpm add node-csfd-api
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## 🚀 Quick Start
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { csfd } from 'node-csfd-api';
|
|
49
|
+
|
|
50
|
+
// Fetch movie details
|
|
51
|
+
const movie = await csfd.movie(535121);
|
|
52
|
+
console.log(movie.title); // "Na špatné straně"
|
|
53
|
+
|
|
54
|
+
// Search for content
|
|
55
|
+
const results = await csfd.search('Tarantino');
|
|
56
|
+
console.log(results.movies, results.tvSeries, results.users);
|
|
57
|
+
|
|
58
|
+
// Get creator info
|
|
59
|
+
const creator = await csfd.creator(2120);
|
|
60
|
+
console.log(creator.name); // "Quentin Tarantino"
|
|
61
|
+
|
|
62
|
+
// Get user ratings
|
|
63
|
+
const ratings = await csfd.userRatings('912');
|
|
64
|
+
console.log(ratings);
|
|
65
|
+
|
|
66
|
+
// Get user reviews
|
|
67
|
+
const reviews = await csfd.userReviews('195357-verbal');
|
|
68
|
+
console.log(reviews);
|
|
28
69
|
```
|
|
29
70
|
|
|
30
|
-
##
|
|
71
|
+
## 📖 Table of Contents
|
|
72
|
+
|
|
73
|
+
- [Movie Details](#movie)
|
|
74
|
+
- [Search](#search)
|
|
75
|
+
- [Creators](#creators)
|
|
76
|
+
- [User Ratings](#user-ratings)
|
|
77
|
+
- [User Reviews](#user-reviews)
|
|
78
|
+
- [Docker Support](#-docker-support)
|
|
79
|
+
- [Development](#-development)
|
|
31
80
|
|
|
32
|
-
|
|
33
|
-
- [User Ratings](#User-Ratings)
|
|
34
|
-
- [User Reviews](#User-Reviews)
|
|
35
|
-
- [Search](#Search)
|
|
36
|
-
- [Creators](#Creators)
|
|
81
|
+
## 📚 API Reference
|
|
37
82
|
|
|
38
83
|
### Movie
|
|
39
84
|
|
|
40
|
-
>
|
|
85
|
+
> Retrieve comprehensive information about a movie or TV series by its ČSFD ID.
|
|
41
86
|
|
|
42
|
-
|
|
87
|
+
**Method:** `csfd.movie(id: number): Promise<Movie>`
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
43
90
|
import { csfd } from 'node-csfd-api';
|
|
44
91
|
|
|
92
|
+
// Using async/await
|
|
93
|
+
const movie = await csfd.movie(535121);
|
|
94
|
+
|
|
95
|
+
// Alternatively, using promises
|
|
45
96
|
csfd.movie(535121).then((movie) => console.log(movie));
|
|
46
97
|
```
|
|
47
98
|
|
|
48
99
|
<details>
|
|
49
|
-
<summary
|
|
100
|
+
<summary>🔎 Click here to see full result example</summary>
|
|
50
101
|
|
|
51
102
|
```javascript
|
|
52
103
|
{
|
|
@@ -144,16 +195,23 @@ csfd.movie(535121).then((movie) => console.log(movie));
|
|
|
144
195
|
|
|
145
196
|
### Search
|
|
146
197
|
|
|
147
|
-
> Search movies,
|
|
198
|
+
> Search for movies, TV series, and users across the ČSFD database.
|
|
148
199
|
|
|
149
|
-
|
|
200
|
+
**Method:** `csfd.search(query: string): Promise<SearchResults>`
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
150
203
|
import { csfd } from 'node-csfd-api';
|
|
151
204
|
|
|
152
|
-
csfd.search('bart')
|
|
205
|
+
const results = await csfd.search('bart');
|
|
206
|
+
|
|
207
|
+
// Access different result types
|
|
208
|
+
console.log(results.movies); // Array of movies
|
|
209
|
+
console.log(results.tvSeries); // Array of TV series
|
|
210
|
+
console.log(results.users); // Array of users
|
|
153
211
|
```
|
|
154
212
|
|
|
155
213
|
<details>
|
|
156
|
-
<summary
|
|
214
|
+
<summary>🔎 Click here to see full result example</summary>
|
|
157
215
|
|
|
158
216
|
```javascript
|
|
159
217
|
[
|
|
@@ -208,16 +266,24 @@ users: [
|
|
|
208
266
|
|
|
209
267
|
### Creators
|
|
210
268
|
|
|
211
|
-
> Get creator
|
|
269
|
+
> Get detailed information about a creator including their biography and filmography.
|
|
212
270
|
|
|
213
|
-
|
|
271
|
+
**Method:** `csfd.creator(id: number): Promise<Creator>`
|
|
272
|
+
|
|
273
|
+
```typescript
|
|
214
274
|
import { csfd } from 'node-csfd-api';
|
|
215
275
|
|
|
216
|
-
csfd.creator(2120)
|
|
276
|
+
const creator = await csfd.creator(2120); // Quentin Tarantino
|
|
277
|
+
|
|
278
|
+
console.log(creator.name); // Name
|
|
279
|
+
console.log(creator.bio); // Biography
|
|
280
|
+
console.log(creator.films); // Filmography
|
|
281
|
+
console.log(creator.birthday); // Birth date
|
|
282
|
+
// ... many more properties, see example
|
|
217
283
|
```
|
|
218
284
|
|
|
219
285
|
<details>
|
|
220
|
-
<summary
|
|
286
|
+
<summary>🔎 Click here to see full result example</summary>
|
|
221
287
|
|
|
222
288
|
```javascript
|
|
223
289
|
{
|
|
@@ -298,49 +364,45 @@ csfd.creator(2120).then((creator) => console.log(creator));
|
|
|
298
364
|
|
|
299
365
|
### User Ratings
|
|
300
366
|
|
|
301
|
-
|
|
367
|
+
> Retrieve user ratings from their ČSFD profile.
|
|
302
368
|
|
|
303
|
-
|
|
369
|
+
**Method:** `csfd.userRatings(username: string, options?: UserRatingsOptions): Promise<Rating[]>`
|
|
304
370
|
|
|
305
|
-
|
|
371
|
+
#### Basic Usage
|
|
372
|
+
|
|
373
|
+
```typescript
|
|
306
374
|
import { csfd } from 'node-csfd-api';
|
|
307
375
|
|
|
308
|
-
|
|
376
|
+
// Get last page of ratings (~50 items)
|
|
377
|
+
const ratings = await csfd.userRatings('912-bart');
|
|
309
378
|
```
|
|
310
379
|
|
|
311
|
-
####
|
|
380
|
+
#### Advanced Options
|
|
312
381
|
|
|
313
|
-
|
|
382
|
+
```typescript
|
|
383
|
+
// Get specific page
|
|
384
|
+
const page2 = await csfd.userRatings('912-bart', { page: 2 });
|
|
314
385
|
|
|
315
|
-
Get
|
|
386
|
+
// Get all ratings (use with caution - rate limiting applies)
|
|
387
|
+
const allRatings = await csfd.userRatings('912-bart', {
|
|
388
|
+
allPages: true,
|
|
389
|
+
allPagesDelay: 2000 // 2 second delay between requests
|
|
390
|
+
});
|
|
316
391
|
|
|
317
|
-
|
|
318
|
-
|
|
392
|
+
// Filter by content type
|
|
393
|
+
const onlyMovies = await csfd.userRatings('912-bart', {
|
|
394
|
+
includesOnly: ['film']
|
|
395
|
+
});
|
|
319
396
|
|
|
320
|
-
csfd
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
allPageDelay: 2000 // Make delay 2000ms on each page request
|
|
324
|
-
})
|
|
325
|
-
.then((ratings) => console.log(ratings));
|
|
397
|
+
const excludeEpisodes = await csfd.userRatings('912-bart', {
|
|
398
|
+
exclude: ['epizoda', 'série']
|
|
399
|
+
});
|
|
326
400
|
```
|
|
327
401
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
Get [second page of my ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/?page=2)
|
|
331
|
-
|
|
332
|
-
```javascript
|
|
333
|
-
import { csfd } from 'node-csfd-api';
|
|
334
|
-
|
|
335
|
-
csfd
|
|
336
|
-
.userRatings('912-bart', {
|
|
337
|
-
page: 2 // Get specific page
|
|
338
|
-
})
|
|
339
|
-
.then((ratings) => console.log(ratings));
|
|
340
|
-
```
|
|
402
|
+
> ⚠️ **Rate Limiting Warning**: When fetching all pages, use appropriate delays to avoid detection. Consider implementing exponential backoff for large datasets.
|
|
341
403
|
|
|
342
404
|
<details>
|
|
343
|
-
<summary
|
|
405
|
+
<summary>🔎 Click here to see full result example</summary>
|
|
344
406
|
|
|
345
407
|
```javascript
|
|
346
408
|
[
|
|
@@ -367,63 +429,56 @@ csfd
|
|
|
367
429
|
|
|
368
430
|
</details>
|
|
369
431
|
|
|
370
|
-
####
|
|
432
|
+
#### UserRatingsOptions
|
|
371
433
|
|
|
372
|
-
| Option
|
|
373
|
-
|
|
|
374
|
-
|
|
|
375
|
-
|
|
|
376
|
-
|
|
|
377
|
-
|
|
|
378
|
-
|
|
|
434
|
+
| Option | Type | Default | Description |
|
|
435
|
+
| --------------- | ----------------- | ------- | ---------------------------------------------------------------- |
|
|
436
|
+
| `includesOnly` | `CSFDFilmTypes[]` | `null` | Include only specific content types (e.g., `['film', 'seriál']`) |
|
|
437
|
+
| `exclude` | `CSFDFilmTypes[]` | `null` | Exclude specific content types (e.g., `['epizoda']`) |
|
|
438
|
+
| `allPages` | `boolean` | `false` | Fetch all pages of ratings |
|
|
439
|
+
| `allPagesDelay` | `number` | `0` | Delay between page requests in milliseconds |
|
|
440
|
+
| `page` | `number` | `1` | Fetch specific page number |
|
|
379
441
|
|
|
380
|
-
|
|
442
|
+
> 📝 **Note**: `includesOnly` and `exclude` are mutually exclusive. If both are provided, `includesOnly` takes precedence.
|
|
443
|
+
>
|
|
444
|
+
> 🔗 See [CSFDFilmTypes definition](https://github.com/bartholomej/node-csfd-api/blob/master/src/dto/global.ts)
|
|
381
445
|
|
|
382
446
|
### User Reviews
|
|
383
447
|
|
|
384
|
-
|
|
448
|
+
> Retrieve detailed user reviews from their ČSFD profile.
|
|
385
449
|
|
|
386
|
-
|
|
450
|
+
**Method:** `csfd.userReviews(userId: number | string, options?: UserReviewsOptions): Promise<Review[]>`
|
|
387
451
|
|
|
388
|
-
|
|
389
|
-
import { csfd } from 'node-csfd-api';
|
|
452
|
+
#### Basic Usage
|
|
390
453
|
|
|
391
|
-
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
#### All reviews (all pages)
|
|
395
|
-
|
|
396
|
-
> Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute.
|
|
397
|
-
|
|
398
|
-
Get [all user reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/)
|
|
399
|
-
|
|
400
|
-
```javascript
|
|
454
|
+
```typescript
|
|
401
455
|
import { csfd } from 'node-csfd-api';
|
|
402
456
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
allPages: true, // Download all pages (one by one)
|
|
406
|
-
allPagesDelay: 2000 // Make delay 2000ms on each page request
|
|
407
|
-
})
|
|
408
|
-
.then((reviews) => console.log(reviews));
|
|
457
|
+
// Get latest reviews
|
|
458
|
+
const reviews = await csfd.userReviews(195357);
|
|
409
459
|
```
|
|
410
460
|
|
|
411
|
-
####
|
|
461
|
+
#### Advanced Options
|
|
412
462
|
|
|
413
|
-
|
|
463
|
+
```typescript
|
|
464
|
+
// Get specific page
|
|
465
|
+
const page2 = await csfd.userReviews(195357, { page: 2 });
|
|
414
466
|
|
|
415
|
-
|
|
416
|
-
|
|
467
|
+
// Get all reviews with rate limiting
|
|
468
|
+
const allReviews = await csfd.userReviews(195357, {
|
|
469
|
+
allPages: true,
|
|
470
|
+
allPagesDelay: 2000
|
|
471
|
+
});
|
|
417
472
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
473
|
+
// Filter by content type
|
|
474
|
+
const filtered = await csfd.userReviews(195357, {
|
|
475
|
+
includesOnly: ['film'],
|
|
476
|
+
exclude: ['epizoda']
|
|
477
|
+
});
|
|
423
478
|
```
|
|
424
479
|
|
|
425
480
|
<details>
|
|
426
|
-
<summary
|
|
481
|
+
<summary>🔎 Click here to see full result example</summary>
|
|
427
482
|
|
|
428
483
|
```javascript
|
|
429
484
|
[
|
|
@@ -458,166 +513,219 @@ csfd
|
|
|
458
513
|
|
|
459
514
|
</details>
|
|
460
515
|
|
|
461
|
-
####
|
|
462
|
-
|
|
463
|
-
| Option | Type | Default | Description |
|
|
464
|
-
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------ |
|
|
465
|
-
| **includesOnly** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Including only film types. eg. `['seriál', 'koncert']` |
|
|
466
|
-
| **exclude** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Excluding film types eg. `['epizoda', 'série']` |
|
|
467
|
-
| **allPages** | boolean | false | Get all pages |
|
|
468
|
-
| **allPagesDelay** | number | 0 | Delay on each page request. In milliseconds |
|
|
469
|
-
| **page** | number | 1 | Specific page number to fetch (e.g., 2 for page 2) |
|
|
470
|
-
|
|
471
|
-
_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
|
|
516
|
+
#### UserReviewsOptions
|
|
472
517
|
|
|
473
|
-
|
|
518
|
+
Same options as [UserRatingsOptions](#userrationsoptions).
|
|
474
519
|
|
|
475
|
-
|
|
520
|
+
## 🐳 Docker Support
|
|
476
521
|
|
|
477
|
-
|
|
522
|
+
Run the CSFD API as a standalone REST service using Docker.
|
|
478
523
|
|
|
479
|
-
###
|
|
524
|
+
### Using Pre-built Image
|
|
480
525
|
|
|
481
526
|
```bash
|
|
527
|
+
# Pull the latest image
|
|
482
528
|
docker pull bartholomej/node-csfd-api
|
|
483
|
-
```
|
|
484
529
|
|
|
485
|
-
|
|
530
|
+
# Run the container
|
|
531
|
+
docker run -p 3000:3000 bartholomej/node-csfd-api
|
|
532
|
+
```
|
|
486
533
|
|
|
487
|
-
|
|
534
|
+
### Building Your Own Image
|
|
488
535
|
|
|
489
536
|
```bash
|
|
537
|
+
# Build the image
|
|
490
538
|
docker build -t node-csfd-api .
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
> Run image on port 3000
|
|
494
539
|
|
|
495
|
-
|
|
540
|
+
# Run the container
|
|
496
541
|
docker run -p 3000:3000 node-csfd-api
|
|
497
542
|
```
|
|
498
543
|
|
|
499
|
-
|
|
544
|
+
### REST API Endpoints
|
|
500
545
|
|
|
501
|
-
|
|
546
|
+
Once running, access the API at `http://localhost:3000`:
|
|
502
547
|
|
|
503
|
-
|
|
548
|
+
| Endpoint | Description | Example |
|
|
549
|
+
| ------------------------- | ----------------- | ------------------------ |
|
|
550
|
+
| `/movie/:id` | Get movie details | `/movie/535121` |
|
|
551
|
+
| `/search/:query` | Search content | `/search/tarantino` |
|
|
552
|
+
| `/creator/:id` | Get creator info | `/creator/2120` |
|
|
553
|
+
| `/user-ratings/:username` | Get user ratings | `/user-ratings/912-bart` |
|
|
554
|
+
| `/user-reviews/:userId` | Get user reviews | `/user-reviews/195357` |
|
|
504
555
|
|
|
505
|
-
|
|
506
|
-
- `/search/quentin+tarantino`
|
|
507
|
-
- `/creator/2120`
|
|
508
|
-
- `/user-ratings/912-bart`
|
|
509
|
-
- `/user-reviews/195357`
|
|
556
|
+
**Docker Hub:** [bartholomej/node-csfd-api](https://hub.docker.com/r/bartholomej/node-csfd-api)
|
|
510
557
|
|
|
511
|
-
##
|
|
558
|
+
## 🌟 Real-World Usage
|
|
512
559
|
|
|
513
|
-
|
|
560
|
+
This library powers several production applications:
|
|
514
561
|
|
|
515
|
-
|
|
516
|
-
- [Dafilms: chrome extension](https://chrome.google.com/webstore/detail/dafilms/hgcgneddmgflnbmhkjnefiobjgobbmdm) ([code](https://github.com/bartholomej/dafilms-ext))
|
|
517
|
-
- [Kviff.tv: chrome extension](https://chrome.google.com/webstore/detail/kvifftv-%20-csfd/ihpngekoejodiligajlppbeedofhnmfm) ([code](https://github.com/bartholomej/kviff-ext))
|
|
562
|
+
### Browser Extensions
|
|
518
563
|
|
|
519
|
-
|
|
564
|
+
- **[Netflix ČSFD Extension](https://chrome.google.com/webstore/detail/netflix-csfd/eomgekccbddnlpmehgdjmlphndjgnlni)** - Shows ČSFD ratings on Netflix ([source](https://github.com/bartholomej/netflix-csfd-ext))
|
|
565
|
+
- **[Dafilms Extension](https://chrome.google.com/webstore/detail/dafilms/hgcgneddmgflnbmhkjnefiobjgobbmdm)** - ČSFD integration for Dafilms ([source](https://github.com/bartholomej/dafilms-ext))
|
|
566
|
+
- **[Kviff.tv Extension](https://chrome.google.com/webstore/detail/kvifftv-%20-csfd/ihpngekoejodiligajlppbeedofhnmfm)** - ČSFD ratings for Kviff.tv ([source](https://github.com/bartholomej/kviff-ext))
|
|
520
567
|
|
|
521
|
-
|
|
568
|
+
### Web Applications
|
|
522
569
|
|
|
523
|
-
|
|
570
|
+
- **[bartweb.cz](https://bartweb.cz)** - Personal website using Firebase Functions for "Last Seen" movie tracking
|
|
524
571
|
|
|
525
|
-
|
|
572
|
+
### Mobile Applications
|
|
573
|
+
|
|
574
|
+
- **[KinoKlub](https://play.google.com/store/apps/details?id=com.aquasoup)** - React Native app for AeroFilms cinema chain (Android & iOS)
|
|
526
575
|
|
|
527
576
|
## 🔮 Roadmap
|
|
528
577
|
|
|
529
|
-
###
|
|
530
|
-
|
|
531
|
-
-
|
|
532
|
-
-
|
|
533
|
-
-
|
|
534
|
-
-
|
|
535
|
-
-
|
|
536
|
-
-
|
|
537
|
-
|
|
538
|
-
-
|
|
539
|
-
|
|
540
|
-
-
|
|
541
|
-
|
|
542
|
-
-
|
|
543
|
-
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
- [x] Producers
|
|
553
|
-
- [x] Film editors
|
|
554
|
-
- [x] Costume designers
|
|
555
|
-
- [x] Production designers
|
|
556
|
-
- [x] Premieres
|
|
557
|
-
- [x] Related movies
|
|
558
|
-
- [x] Similar movies
|
|
559
|
-
- [x] Trivia
|
|
560
|
-
- [x] Photo from movie (random)
|
|
561
|
-
- [ ] Reviews (from movie page)
|
|
562
|
-
- [ ] OST
|
|
563
|
-
- [ ] Search
|
|
564
|
-
- [x] Movies
|
|
565
|
-
- [x] Users
|
|
566
|
-
- [x] TV Series
|
|
567
|
-
- [ ] Creators
|
|
568
|
-
- [x] Creators
|
|
569
|
-
- [x] Bio
|
|
570
|
-
- [x] Movies (TODO categories)
|
|
571
|
-
- [x] User Ratings
|
|
572
|
-
- [x] Last ratings
|
|
573
|
-
- [x] All pages
|
|
574
|
-
- [x] User Reviews
|
|
575
|
-
- [x] Last reviews
|
|
576
|
-
- [x] All pages
|
|
577
|
-
- [ ] Filter by type
|
|
578
|
+
### Completed Features ✅
|
|
579
|
+
|
|
580
|
+
- **Movies & TV Series**
|
|
581
|
+
- Basic info (title, year, rating, poster, duration)
|
|
582
|
+
- Detailed metadata (genres, origins, VOD platforms)
|
|
583
|
+
- Cast & crew (directors, actors, writers, composers, producers, etc.)
|
|
584
|
+
- Related content (similar movies, trivia)
|
|
585
|
+
- Alternative titles, premieres, tags
|
|
586
|
+
- **Search**
|
|
587
|
+
- Movies, TV series, and users
|
|
588
|
+
- **Creators**
|
|
589
|
+
- Biography and filmography
|
|
590
|
+
- **User Data**
|
|
591
|
+
- Ratings with pagination and filtering
|
|
592
|
+
- Reviews with pagination and filtering
|
|
593
|
+
|
|
594
|
+
### Planned Features 🚧
|
|
595
|
+
|
|
596
|
+
- [ ] Movie: reviews from movie detail page
|
|
597
|
+
- [ ] Movie: Original soundtracks (OST) information
|
|
598
|
+
- [ ] Search: Creator search functionality
|
|
599
|
+
- [ ] Server: Caching layer for improved performance
|
|
600
|
+
- [ ] Server: Rate limiting helpers
|
|
578
601
|
|
|
579
602
|
## 🛠️ Development
|
|
580
603
|
|
|
581
|
-
###
|
|
604
|
+
### Prerequisites
|
|
605
|
+
|
|
606
|
+
- Node.js 18+
|
|
607
|
+
- yarn/npm/pnpm/...
|
|
608
|
+
|
|
609
|
+
### Setup
|
|
582
610
|
|
|
583
611
|
```bash
|
|
612
|
+
# Clone the repository
|
|
613
|
+
git clone https://github.com/bartholomej/node-csfd-api.git
|
|
614
|
+
cd node-csfd-api
|
|
615
|
+
|
|
616
|
+
# Install dependencies
|
|
617
|
+
yarn install
|
|
618
|
+
|
|
619
|
+
# Run tests
|
|
620
|
+
yarn test
|
|
621
|
+
|
|
622
|
+
# Run tests with coverage
|
|
623
|
+
yarn test:coverage
|
|
624
|
+
|
|
625
|
+
# Start development mode
|
|
584
626
|
yarn start
|
|
627
|
+
|
|
628
|
+
# Run the demo
|
|
629
|
+
yarn demo
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
### Project Structure
|
|
633
|
+
|
|
634
|
+
```text
|
|
635
|
+
src/
|
|
636
|
+
├── dto/ # Data transfer objects & types
|
|
637
|
+
├── fetchers/ # HTTP request handlers
|
|
638
|
+
├── helpers/ # Parsing & data transformation
|
|
639
|
+
├── services/ # Main API service classes
|
|
640
|
+
└── index.ts # Public API exports
|
|
585
641
|
```
|
|
586
642
|
|
|
587
|
-
###
|
|
643
|
+
### Testing
|
|
588
644
|
|
|
589
|
-
|
|
645
|
+
The project maintains ~100% code coverage. Tests are located in the `tests/` directory.
|
|
590
646
|
|
|
591
647
|
```bash
|
|
592
|
-
|
|
648
|
+
# Run all tests
|
|
649
|
+
yarn test
|
|
650
|
+
|
|
651
|
+
# Run tests in watch mode
|
|
652
|
+
yarn test:watch
|
|
653
|
+
|
|
654
|
+
# Generate coverage report
|
|
655
|
+
yarn test:coverage
|
|
593
656
|
```
|
|
594
657
|
|
|
595
|
-
## 🤝
|
|
658
|
+
## 🤝 Contributing
|
|
659
|
+
|
|
660
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
661
|
+
|
|
662
|
+
### How to Contribute
|
|
663
|
+
|
|
664
|
+
1. **Fork the repository**
|
|
665
|
+
2. **Create a feature branch** (`git checkout -b feature/amazing-feature`)
|
|
666
|
+
3. **Make your changes**
|
|
667
|
+
4. **Add tests** for new functionality
|
|
668
|
+
5. **Ensure tests pass** (`yarn test`)
|
|
669
|
+
6. **Commit your changes** (`git commit -m 'Add amazing feature'`)
|
|
670
|
+
7. **Push to the branch** (`git push origin feature/amazing-feature`)
|
|
671
|
+
8. **Open a Pull Request**
|
|
596
672
|
|
|
597
|
-
|
|
673
|
+
### Guidelines
|
|
598
674
|
|
|
599
|
-
|
|
675
|
+
- Write clear, concise commit messages
|
|
676
|
+
- Add tests for new features
|
|
677
|
+
- Update documentation as needed
|
|
678
|
+
- Follow the existing code style
|
|
679
|
+
- Ensure all tests pass before submitting PR
|
|
600
680
|
|
|
601
|
-
|
|
681
|
+
### Reporting Issues
|
|
602
682
|
|
|
603
|
-
|
|
683
|
+
Found a bug? Have a feature request? Please [open an issue](https://github.com/bartholomej/node-csfd-api/issues) with:
|
|
604
684
|
|
|
605
|
-
|
|
685
|
+
- Clear description of the problem
|
|
686
|
+
- Steps to reproduce (for bugs)
|
|
687
|
+
- Expected vs actual behavior
|
|
688
|
+
- Environment details (Node version, OS, etc.)
|
|
606
689
|
|
|
607
|
-
##
|
|
690
|
+
## ⭐️ Support
|
|
608
691
|
|
|
609
|
-
|
|
692
|
+
If you find this project useful and you are brave enough consider [making a donation](https://github.com/sponsors/bartholomej) for some 🍺 or 🍵 ;)
|
|
693
|
+
|
|
694
|
+
- Giving it a ⭐️ on [GitHub](https://github.com/bartholomej/node-csfd-api)
|
|
695
|
+
- Sharing it with others who might benefit
|
|
696
|
+
- [Sponsoring the project](https://github.com/sponsors/bartholomej) to support ongoing development
|
|
697
|
+
|
|
698
|
+
Your support helps maintain and improve this library! 🙏
|
|
699
|
+
|
|
700
|
+
## 🔒 Privacy & Security
|
|
701
|
+
|
|
702
|
+
**This library does not collect, store, or transmit any user data.**
|
|
703
|
+
|
|
704
|
+
All requests are made directly from your application to ČSFD.cz. No intermediary servers are involved, and no data is logged or stored by this library.
|
|
610
705
|
|
|
611
706
|
I physically can't. I have nowhere to store it. I don't even have a server database to store it. So even if Justin Bieber asked nicely to see your data, I wouldn't have anything to show him.
|
|
612
707
|
|
|
613
|
-
|
|
708
|
+
### Important Notes
|
|
709
|
+
|
|
710
|
+
- This is a **scraping library** - use it responsibly and respect ❤️ ČSFD's terms of service
|
|
711
|
+
- Implement appropriate rate limiting in production
|
|
712
|
+
- Consider caching responses to minimize server load
|
|
713
|
+
- Be aware of CORS restrictions when using in browsers
|
|
614
714
|
|
|
615
715
|
## 📝 License
|
|
616
716
|
|
|
617
|
-
|
|
717
|
+
MIT © 2020 - 2025 [Lukas Bartak](http://bartweb.cz)
|
|
718
|
+
|
|
719
|
+
See [LICENSE](LICENSE) for full details.
|
|
720
|
+
|
|
721
|
+
---
|
|
722
|
+
|
|
723
|
+
<div align="center">
|
|
724
|
+
|
|
725
|
+
**Built with ❤️ by [Lukas Bartak](https://bartweb.cz)**
|
|
618
726
|
|
|
619
|
-
|
|
727
|
+
Powered by nature 🗻, wind 💨, tea 🍵 and beer 🍺
|
|
620
728
|
|
|
621
|
-
|
|
729
|
+
[⭐ Star on GitHub](https://github.com/bartholomej/node-csfd-api) • [📦 NPM Package](https://www.npmjs.com/node-csfd-api) • [🐳 Docker Hub](https://hub.docker.com/r/bartholomej/node-csfd-api)
|
|
622
730
|
|
|
623
|
-
|
|
731
|
+
</div>
|