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.
Files changed (79) hide show
  1. package/README.md +317 -209
  2. package/dto/movie.d.mts +4 -2
  3. package/dto/movie.d.ts +4 -2
  4. package/dto/options.d.mts +9 -0
  5. package/dto/options.d.ts +9 -0
  6. package/dto/user-ratings.d.mts +2 -2
  7. package/dto/user-ratings.d.ts +2 -2
  8. package/fetchers/fetch.polyfill.js +0 -2
  9. package/fetchers/fetch.polyfill.js.map +1 -1
  10. package/fetchers/index.js +1 -1
  11. package/fetchers/index.js.map +1 -1
  12. package/fetchers/index.mjs +1 -1
  13. package/fetchers/index.mjs.map +1 -1
  14. package/helpers/cinema.helper.js.map +1 -1
  15. package/helpers/cinema.helper.mjs.map +1 -1
  16. package/helpers/creator.helper.js.map +1 -1
  17. package/helpers/creator.helper.mjs.map +1 -1
  18. package/helpers/global.helper.js.map +1 -1
  19. package/helpers/global.helper.mjs.map +1 -1
  20. package/helpers/movie.helper.js +57 -0
  21. package/helpers/movie.helper.js.map +1 -1
  22. package/helpers/movie.helper.mjs +57 -1
  23. package/helpers/movie.helper.mjs.map +1 -1
  24. package/helpers/search-user.helper.js +0 -2
  25. package/helpers/search-user.helper.js.map +1 -1
  26. package/helpers/search.helper.js.map +1 -1
  27. package/helpers/search.helper.mjs.map +1 -1
  28. package/helpers/user-ratings.helper.js.map +1 -1
  29. package/helpers/user-ratings.helper.mjs.map +1 -1
  30. package/helpers/user-reviews.helper.js.map +1 -1
  31. package/helpers/user-reviews.helper.mjs.map +1 -1
  32. package/index.d.mts +15 -15
  33. package/index.d.ts +15 -15
  34. package/index.js +23 -16
  35. package/index.js.map +1 -1
  36. package/index.mjs +23 -16
  37. package/index.mjs.map +1 -1
  38. package/package.json +3 -3
  39. package/services/cinema.service.d.mts +2 -1
  40. package/services/cinema.service.d.ts +2 -1
  41. package/services/cinema.service.js +2 -4
  42. package/services/cinema.service.js.map +1 -1
  43. package/services/cinema.service.mjs +2 -2
  44. package/services/cinema.service.mjs.map +1 -1
  45. package/services/creator.service.d.mts +2 -1
  46. package/services/creator.service.d.ts +2 -1
  47. package/services/creator.service.js +2 -4
  48. package/services/creator.service.js.map +1 -1
  49. package/services/creator.service.mjs +2 -2
  50. package/services/creator.service.mjs.map +1 -1
  51. package/services/movie.service.d.mts +2 -1
  52. package/services/movie.service.d.ts +2 -1
  53. package/services/movie.service.js +15 -17
  54. package/services/movie.service.js.map +1 -1
  55. package/services/movie.service.mjs +16 -16
  56. package/services/movie.service.mjs.map +1 -1
  57. package/services/search.service.d.mts +2 -1
  58. package/services/search.service.d.ts +2 -1
  59. package/services/search.service.js +8 -9
  60. package/services/search.service.js.map +1 -1
  61. package/services/search.service.mjs +9 -8
  62. package/services/search.service.mjs.map +1 -1
  63. package/services/user-ratings.service.d.mts +2 -1
  64. package/services/user-ratings.service.d.ts +2 -1
  65. package/services/user-ratings.service.js +4 -6
  66. package/services/user-ratings.service.js.map +1 -1
  67. package/services/user-ratings.service.mjs +4 -4
  68. package/services/user-ratings.service.mjs.map +1 -1
  69. package/services/user-reviews.service.d.mts +2 -1
  70. package/services/user-reviews.service.d.ts +2 -1
  71. package/services/user-reviews.service.js +4 -6
  72. package/services/user-reviews.service.js.map +1 -1
  73. package/services/user-reviews.service.mjs +4 -4
  74. package/services/user-reviews.service.mjs.map +1 -1
  75. package/vars.js +17 -7
  76. package/vars.js.map +1 -1
  77. package/vars.mjs +17 -8
  78. package/vars.mjs.map +1 -1
  79. package/_virtual/rolldown_runtime.js +0 -25
package/README.md CHANGED
@@ -1,52 +1,103 @@
1
1
  [![npm version](https://badge.fury.io/js/node-csfd-api.svg)](https://badge.fury.io/js/node-csfd-api)
2
- [![Package License](https://img.shields.io/npm/l/node-csfd-api.svg)](https://www.npmjs.com/node-csfd-api)
2
+ [![License](https://img.shields.io/npm/l/node-csfd-api.svg)](https://www.npmjs.com/node-csfd-api)
3
3
  [![Build & Publish](https://github.com/bartholomej/node-csfd-api/workflows/Publish/badge.svg)](https://github.com/bartholomej/node-csfd-api/actions)
4
- [![codecov](https://codecov.io/gh/bartholomej/node-csfd-api/branch/master/graph/badge.svg?token=YQH9UoVrGP)](https://codecov.io/gh/bartholomej/node-csfd-api)
4
+ [![Coverage](https://codecov.io/gh/bartholomej/node-csfd-api/branch/master/graph/badge.svg?token=YQH9UoVrGP)](https://codecov.io/gh/bartholomej/node-csfd-api)
5
+ [![npm downloads](https://img.shields.io/npm/dm/node-csfd-api.svg)](https://www.npmjs.com/node-csfd-api)
5
6
 
6
- # CSFD API 🎥 2025
7
+ <div align="center">
7
8
 
8
- > JavaScript NPM library for scraping **Czech Movie Database (csfd.cz)**
9
- >
10
- > - JavaScript / TypeScript
11
- > - Browser + Node.js (SSR)
12
- > - Tested (~100% Code coverage)
13
- > - ✅ Ready for new ČSFD 2025!
14
- > - You can use in:
15
- > - Docker – [_How to do it?_](#-docker)
16
- > - Firebase function
17
- > - AWS λ (lambda function)
18
- > - CloudFlare Worker
19
- > - Chrome extension
20
- > - React native app
21
- > - Browsers (Pay attention to CORS)
22
-
23
- ## 🗜️ Install
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
- ## 🛠️ Usage and examples
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
- - [Movies and TV Series](#Movie)
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
- > Get info about [this movie](https://www.csfd.cz/film/535121-na-spatne-strane/komentare/) _(id: 535121)_
85
+ > Retrieve comprehensive information about a movie or TV series by its ČSFD ID.
41
86
 
42
- ```javascript
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>Click here to see full result example</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, users and TV series
198
+ > Search for movies, TV series, and users across the ČSFD database.
148
199
 
149
- ```javascript
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').then((search) => console.log(search));
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>Click here to see full result example</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 info + filmography
269
+ > Get detailed information about a creator including their biography and filmography.
212
270
 
213
- ```javascript
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).then((creator) => console.log(creator));
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>Click here to see full result example</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
- #### Last ratings (last page)
367
+ > Retrieve user ratings from their ČSFD profile.
302
368
 
303
- Get [my last 50 ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/)
369
+ **Method:** `csfd.userRatings(username: string, options?: UserRatingsOptions): Promise<Rating[]>`
304
370
 
305
- ```javascript
371
+ #### Basic Usage
372
+
373
+ ```typescript
306
374
  import { csfd } from 'node-csfd-api';
307
375
 
308
- csfd.userRatings('912-bart').then((ratings) => console.log(ratings));
376
+ // Get last page of ratings (~50 items)
377
+ const ratings = await csfd.userRatings('912-bart');
309
378
  ```
310
379
 
311
- #### All ratings (all pages)
380
+ #### Advanced Options
312
381
 
313
- > Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute.
382
+ ```typescript
383
+ // Get specific page
384
+ const page2 = await csfd.userRatings('912-bart', { page: 2 });
314
385
 
315
- Get [all of my ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/)
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
- ```javascript
318
- import { csfd } from 'node-csfd-api';
392
+ // Filter by content type
393
+ const onlyMovies = await csfd.userRatings('912-bart', {
394
+ includesOnly: ['film']
395
+ });
319
396
 
320
- csfd
321
- .userRatings('912-bart', {
322
- allPages: true, // Download all pages (one by one)
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
- #### Specific page
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>Click here to see full result example</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
- #### Options for user ratings
432
+ #### UserRatingsOptions
371
433
 
372
- | Option | Type | Default | Description |
373
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------ |
374
- | **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']` |
375
- | **exclude** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Excluding film types eg. `['epizoda', 'série']` |
376
- | **allPages** | boolean | false | Get all pages |
377
- | **allPagesDelay** | number | 0 | Delay on each page request. In milliseconds |
378
- | **page** | number | 1 | Specific page number to fetch (e.g., 2 for page 2) |
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
- _Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
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
- #### Last reviews (last page)
448
+ > Retrieve detailed user reviews from their ČSFD profile.
385
449
 
386
- Get [user's last reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/)
450
+ **Method:** `csfd.userReviews(userId: number | string, options?: UserReviewsOptions): Promise<Review[]>`
387
451
 
388
- ```javascript
389
- import { csfd } from 'node-csfd-api';
452
+ #### Basic Usage
390
453
 
391
- csfd.userReviews(195357).then((reviews) => console.log(reviews));
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
- csfd
404
- .userReviews(195357, {
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
- #### Specific page
461
+ #### Advanced Options
412
462
 
413
- Get [second page of user reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/?page=2)
463
+ ```typescript
464
+ // Get specific page
465
+ const page2 = await csfd.userReviews(195357, { page: 2 });
414
466
 
415
- ```javascript
416
- import { csfd } from 'node-csfd-api';
467
+ // Get all reviews with rate limiting
468
+ const allReviews = await csfd.userReviews(195357, {
469
+ allPages: true,
470
+ allPagesDelay: 2000
471
+ });
417
472
 
418
- csfd
419
- .userReviews(195357, {
420
- page: 2 // Get specific page
421
- })
422
- .then((reviews) => console.log(reviews));
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>Click here to see full result example</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
- #### Options for user reviews
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
- ## 📦 Docker
518
+ Same options as [UserRatingsOptions](#userrationsoptions).
474
519
 
475
- You can use this library in Docker.
520
+ ## 🐳 Docker Support
476
521
 
477
- We have [prepared a Docker image](https://hub.docker.com/r/bartholomej/node-csfd-api) for you.
522
+ Run the CSFD API as a standalone REST service using Docker.
478
523
 
479
- ### Prebuilt image
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
- ### Build & run your own image
530
+ # Run the container
531
+ docker run -p 3000:3000 bartholomej/node-csfd-api
532
+ ```
486
533
 
487
- > Build image
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
- ```bash
540
+ # Run the container
496
541
  docker run -p 3000:3000 node-csfd-api
497
542
  ```
498
543
 
499
- > Open http://localhost:3000
544
+ ### REST API Endpoints
500
545
 
501
- ### API endpoints
546
+ Once running, access the API at `http://localhost:3000`:
502
547
 
503
- > Some examples
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
- - `/movie/535121`
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
- ## 🧑‍💻 Used by
558
+ ## 🌟 Real-World Usage
512
559
 
513
- ### Web extensions
560
+ This library powers several production applications:
514
561
 
515
- - [Netflix: chrome extension](https://chrome.google.com/webstore/detail/netflix-csfd/eomgekccbddnlpmehgdjmlphndjgnlni) ([code](https://github.com/bartholomej/netflix-csfd-ext))
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
- ### Web applications
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
- - [bartweb.cz](https://bartweb.cz) – **Last seen** section (**Firebase function**)
568
+ ### Web Applications
522
569
 
523
- ### Mobile applications
570
+ - **[bartweb.cz](https://bartweb.cz)** - Personal website using Firebase Functions for "Last Seen" movie tracking
524
571
 
525
- - [KinoKlub](https://play.google.com/store/apps/details?id=com.aquasoup) – Mobile application for AeroFilms (React Native: Android + iOS application)
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
- ### Scraping more pages
530
-
531
- - [ ] Movies
532
- - [x] Titles
533
- - [x] Years
534
- - [x] Type
535
- - [x] User rating
536
- - [x] Color rating
537
- - [x] Poster
538
- - [x] Duration
539
- - [x] Origins
540
- - [x] Descriptions
541
- - [x] Genres
542
- - [x] VOD
543
- - [x] Tags
544
- - [x] Premieres
545
- - [x] Creators
546
- - [x] Directors
547
- - [x] Writers
548
- - [x] Cinematography
549
- - [x] Music
550
- - [x] Actors
551
- - [x] BasedOn
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
- ### Developing and debugging library
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
- ### Run demo locally
643
+ ### Testing
588
644
 
589
- You can find and modify it in [`./demo.ts`](https://github.com/bartholomej/node-csfd-api/blob/master/demo.ts) file
645
+ The project maintains ~100% code coverage. Tests are located in the `tests/` directory.
590
646
 
591
647
  ```bash
592
- yarn demo
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
- ## 🤝 Contribution
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
- I welcome you to customize this according to your needs ;)
673
+ ### Guidelines
598
674
 
599
- Pull requests for any improvements would be great!
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
- ## ⭐️ Show your support
681
+ ### Reporting Issues
602
682
 
603
- Give a ⭐️ if this project helped you!
683
+ Found a bug? Have a feature request? Please [open an issue](https://github.com/bartholomej/node-csfd-api/issues) with:
604
684
 
605
- Or if you are brave enough consider [making a donation](https://github.com/sponsors/bartholomej) for some 🍺 or 🍵 ;)
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
- ## 🕵️‍♀️ Privacy Policy
690
+ ## ⭐️ Support
608
691
 
609
- I DO NOT STORE ANY DATA. PERIOD.
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
- That's why, with node-csfd-api, what happens on your device stays on your device till disappear.
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
- Copyright &copy; 2020 2025 [Lukas Bartak](http://bartweb.cz)
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
- Proudly powered by nature 🗻, wind 💨, tea 🍵 and beer 🍺 ;)
727
+ Powered by nature 🗻, wind 💨, tea 🍵 and beer 🍺
620
728
 
621
- All contents are licensed under the [MIT license].
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
- [mit license]: LICENSE
731
+ </div>