node-csfd-api 3.2.0 → 4.0.0-next.0
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 +116 -3
- 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 +6 -2
- package/dto/user-ratings.d.ts +6 -2
- package/dto/user-reviews.d.mts +28 -0
- package/dto/user-reviews.d.ts +28 -0
- 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 +2 -0
- package/helpers/global.helper.js.map +1 -1
- package/helpers/global.helper.mjs +2 -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.helper.js.map +1 -1
- package/helpers/search.helper.mjs.map +1 -1
- package/helpers/user-ratings.helper.js +1 -12
- package/helpers/user-ratings.helper.js.map +1 -1
- package/helpers/user-ratings.helper.mjs +2 -12
- package/helpers/user-ratings.helper.mjs.map +1 -1
- package/helpers/user-reviews.helper.js +57 -0
- package/helpers/user-reviews.helper.js.map +1 -0
- package/helpers/user-reviews.helper.mjs +48 -0
- package/helpers/user-reviews.helper.mjs.map +1 -0
- package/index.d.mts +18 -14
- package/index.d.ts +18 -14
- package/index.js +29 -15
- package/index.js.map +1 -1
- package/index.mjs +29 -15
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/services/cinema.service.d.mts +2 -1
- package/services/cinema.service.d.ts +2 -1
- package/services/cinema.service.js +2 -2
- 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 -2
- 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 -15
- 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 -7
- 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 +7 -5
- package/services/user-ratings.service.js.map +1 -1
- package/services/user-ratings.service.mjs +7 -5
- package/services/user-ratings.service.mjs.map +1 -1
- package/services/user-reviews.service.d.mts +12 -0
- package/services/user-reviews.service.d.ts +12 -0
- package/services/user-reviews.service.js +68 -0
- package/services/user-reviews.service.js.map +1 -0
- package/services/user-reviews.service.mjs +66 -0
- package/services/user-reviews.service.mjs.map +1 -0
- package/vars.js +18 -6
- package/vars.js.map +1 -1
- package/vars.mjs +17 -7
- package/vars.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ npm install node-csfd-api
|
|
|
31
31
|
|
|
32
32
|
- [Movies and TV Series](#Movie)
|
|
33
33
|
- [User Ratings](#User-Ratings)
|
|
34
|
+
- [User Reviews](#User-Reviews)
|
|
34
35
|
- [Search](#Search)
|
|
35
36
|
- [Creators](#Creators)
|
|
36
37
|
|
|
@@ -46,7 +47,7 @@ csfd.movie(535121).then((movie) => console.log(movie));
|
|
|
46
47
|
|
|
47
48
|
<details>
|
|
48
49
|
<summary>Click here to see full result example</summary>
|
|
49
|
-
|
|
50
|
+
|
|
50
51
|
```javascript
|
|
51
52
|
{
|
|
52
53
|
id: 535121,
|
|
@@ -138,6 +139,7 @@ csfd.movie(535121).then((movie) => console.log(movie));
|
|
|
138
139
|
]
|
|
139
140
|
}
|
|
140
141
|
```
|
|
142
|
+
|
|
141
143
|
</details>
|
|
142
144
|
|
|
143
145
|
### Search
|
|
@@ -152,7 +154,7 @@ csfd.search('bart').then((search) => console.log(search));
|
|
|
152
154
|
|
|
153
155
|
<details>
|
|
154
156
|
<summary>Click here to see full result example</summary>
|
|
155
|
-
|
|
157
|
+
|
|
156
158
|
```javascript
|
|
157
159
|
[
|
|
158
160
|
{
|
|
@@ -323,6 +325,20 @@ csfd
|
|
|
323
325
|
.then((ratings) => console.log(ratings));
|
|
324
326
|
```
|
|
325
327
|
|
|
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
|
+
```
|
|
341
|
+
|
|
326
342
|
<details>
|
|
327
343
|
<summary>Click here to see full result example</summary>
|
|
328
344
|
|
|
@@ -359,6 +375,98 @@ csfd
|
|
|
359
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']` |
|
|
360
376
|
| **allPages** | boolean | false | Get all pages |
|
|
361
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) |
|
|
379
|
+
|
|
380
|
+
_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
|
|
381
|
+
|
|
382
|
+
### User Reviews
|
|
383
|
+
|
|
384
|
+
#### Last reviews (last page)
|
|
385
|
+
|
|
386
|
+
Get [user's last reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/)
|
|
387
|
+
|
|
388
|
+
```javascript
|
|
389
|
+
import { csfd } from 'node-csfd-api';
|
|
390
|
+
|
|
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
|
|
401
|
+
import { csfd } from 'node-csfd-api';
|
|
402
|
+
|
|
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));
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
#### Specific page
|
|
412
|
+
|
|
413
|
+
Get [second page of user reviews](https://www.csfd.cz/uzivatel/195357-verbal/recenze/?page=2)
|
|
414
|
+
|
|
415
|
+
```javascript
|
|
416
|
+
import { csfd } from 'node-csfd-api';
|
|
417
|
+
|
|
418
|
+
csfd
|
|
419
|
+
.userReviews(195357, {
|
|
420
|
+
page: 2 // Get specific page
|
|
421
|
+
})
|
|
422
|
+
.then((reviews) => console.log(reviews));
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
<details>
|
|
426
|
+
<summary>Click here to see full result example</summary>
|
|
427
|
+
|
|
428
|
+
```javascript
|
|
429
|
+
[
|
|
430
|
+
{
|
|
431
|
+
id: 1391448,
|
|
432
|
+
title: 'Co s Péťou?',
|
|
433
|
+
year: 2025,
|
|
434
|
+
type: 'film',
|
|
435
|
+
url: 'https://www.csfd.cz/film/1391448-co-s-petou/prehled/',
|
|
436
|
+
colorRating: 'good',
|
|
437
|
+
userDate: '27.11.2025',
|
|
438
|
+
userRating: 4,
|
|
439
|
+
text: 'Co s Péťou? Inu, co by? Každý normální Sparťan by to okamžitě mrdnul z útesu...',
|
|
440
|
+
poster:
|
|
441
|
+
'https://image.pmgstatic.com/cache/resized/w240h339/files/images/film/posters/170/492/170492173_1l3djd.jpg'
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
id: 1530416,
|
|
445
|
+
title: 'Kouzlo derby',
|
|
446
|
+
year: 2025,
|
|
447
|
+
type: 'film',
|
|
448
|
+
url: 'https://www.csfd.cz/film/1530416-kouzlo-derby/prehled/',
|
|
449
|
+
colorRating: 'average',
|
|
450
|
+
userDate: '26.11.2025',
|
|
451
|
+
userRating: 1,
|
|
452
|
+
text: 'Typické kolečkoidní sebevykradačské pásmo klišovitých...',
|
|
453
|
+
poster:
|
|
454
|
+
'https://image.pmgstatic.com/cache/resized/w240h339/files/images/film/posters/170/230/170230377_cimu90.jpg'
|
|
455
|
+
}
|
|
456
|
+
];
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
</details>
|
|
460
|
+
|
|
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) |
|
|
362
470
|
|
|
363
471
|
_Note: You can not use both parameters `includesOnly` and `excludes`. Parameter `includesOnly` has a priority._
|
|
364
472
|
|
|
@@ -398,6 +506,7 @@ docker run -p 3000:3000 node-csfd-api
|
|
|
398
506
|
- `/search/quentin+tarantino`
|
|
399
507
|
- `/creator/2120`
|
|
400
508
|
- `/user-ratings/912-bart`
|
|
509
|
+
- `/user-reviews/195357`
|
|
401
510
|
|
|
402
511
|
## 🧑💻 Used by
|
|
403
512
|
|
|
@@ -449,7 +558,7 @@ docker run -p 3000:3000 node-csfd-api
|
|
|
449
558
|
- [x] Similar movies
|
|
450
559
|
- [x] Trivia
|
|
451
560
|
- [x] Photo from movie (random)
|
|
452
|
-
- [ ] Reviews
|
|
561
|
+
- [ ] Reviews (from movie page)
|
|
453
562
|
- [ ] OST
|
|
454
563
|
- [ ] Search
|
|
455
564
|
- [x] Movies
|
|
@@ -462,6 +571,10 @@ docker run -p 3000:3000 node-csfd-api
|
|
|
462
571
|
- [x] User Ratings
|
|
463
572
|
- [x] Last ratings
|
|
464
573
|
- [x] All pages
|
|
574
|
+
- [x] User Reviews
|
|
575
|
+
- [x] Last reviews
|
|
576
|
+
- [x] All pages
|
|
577
|
+
- [ ] Filter by type
|
|
465
578
|
|
|
466
579
|
## 🛠️ Development
|
|
467
580
|
|
package/dto/movie.d.mts
CHANGED
|
@@ -58,7 +58,9 @@ interface CSFDMovieListItem {
|
|
|
58
58
|
url: string;
|
|
59
59
|
}
|
|
60
60
|
type CSFDGenres = 'Akční' | 'Animovaný' | 'Dobrodružný' | 'Dokumentární' | 'Drama' | 'Experimentální' | 'Fantasy' | 'Film-Noir' | 'Historický' | 'Horor' | 'Hudební' | 'IMAX' | 'Katastrofický' | 'Komedie' | 'Krátkometrážní' | 'Krimi' | 'Loutkový' | 'Muzikál' | 'Mysteriózní' | 'Naučný' | 'Podobenství' | 'Poetický' | 'Pohádka' | 'Povídkový' | 'Psychologický' | 'Publicistický' | 'Reality-TV' | 'Road movie' | 'Rodinný' | 'Romantický' | 'Sci-Fi' | 'Soutěžní' | 'Sportovní' | 'Stand-up' | 'Talk-show' | 'Taneční' | 'Telenovela' | 'Thriller' | 'Válečný' | 'Western' | 'Zábavný' | 'Životopisný';
|
|
61
|
-
type CSFDCreatorGroups = 'Režie' | 'Scénář' | 'Kamera' | 'Hudba' | 'Hrají' | 'Produkce' | 'Střih' | 'Předloha' | 'Scénografie' | 'Kostýmy';
|
|
61
|
+
type CSFDCreatorGroups = 'Režie' | 'Scénář' | 'Kamera' | 'Hudba' | 'Hrají' | 'Produkce' | 'Casting' | 'Střih' | 'Zvuk' | 'Masky' | 'Předloha' | 'Scénografie' | 'Kostýmy';
|
|
62
|
+
type CSFDCreatorGroupsEnglish = 'Directed by' | 'Screenplay' | 'Cinematography' | 'Composer' | 'Cast' | 'Produced by' | 'Casting' | 'Editing' | 'Sound' | 'Make-up' | 'Production design' | 'Based on' | 'Costumes';
|
|
63
|
+
type CSFDCreatorGroupsSlovak = 'Réžia' | 'Scenár' | 'Kamera' | 'Hudba' | 'Hrajú' | 'Predloha' | 'Produkcia' | 'Strih' | 'Kostýmy' | 'Scénografia';
|
|
62
64
|
interface CSFDPremiere {
|
|
63
65
|
country: string;
|
|
64
66
|
format: string;
|
|
@@ -67,5 +69,5 @@ interface CSFDPremiere {
|
|
|
67
69
|
}
|
|
68
70
|
type CSFDBoxContent = 'Související' | 'Podobné';
|
|
69
71
|
//#endregion
|
|
70
|
-
export { CSFDBoxContent, CSFDCreatorGroups, CSFDCreators, CSFDGenres, CSFDMovie, CSFDMovieCreator, CSFDMovieListItem, CSFDPremiere, CSFDTitlesOther, CSFDVod, CSFDVodService };
|
|
72
|
+
export { CSFDBoxContent, CSFDCreatorGroups, CSFDCreatorGroupsEnglish, CSFDCreatorGroupsSlovak, CSFDCreators, CSFDGenres, CSFDMovie, CSFDMovieCreator, CSFDMovieListItem, CSFDPremiere, CSFDTitlesOther, CSFDVod, CSFDVodService };
|
|
71
73
|
//# sourceMappingURL=movie.d.mts.map
|
package/dto/movie.d.ts
CHANGED
|
@@ -58,7 +58,9 @@ interface CSFDMovieListItem {
|
|
|
58
58
|
url: string;
|
|
59
59
|
}
|
|
60
60
|
type CSFDGenres = 'Akční' | 'Animovaný' | 'Dobrodružný' | 'Dokumentární' | 'Drama' | 'Experimentální' | 'Fantasy' | 'Film-Noir' | 'Historický' | 'Horor' | 'Hudební' | 'IMAX' | 'Katastrofický' | 'Komedie' | 'Krátkometrážní' | 'Krimi' | 'Loutkový' | 'Muzikál' | 'Mysteriózní' | 'Naučný' | 'Podobenství' | 'Poetický' | 'Pohádka' | 'Povídkový' | 'Psychologický' | 'Publicistický' | 'Reality-TV' | 'Road movie' | 'Rodinný' | 'Romantický' | 'Sci-Fi' | 'Soutěžní' | 'Sportovní' | 'Stand-up' | 'Talk-show' | 'Taneční' | 'Telenovela' | 'Thriller' | 'Válečný' | 'Western' | 'Zábavný' | 'Životopisný';
|
|
61
|
-
type CSFDCreatorGroups = 'Režie' | 'Scénář' | 'Kamera' | 'Hudba' | 'Hrají' | 'Produkce' | 'Střih' | 'Předloha' | 'Scénografie' | 'Kostýmy';
|
|
61
|
+
type CSFDCreatorGroups = 'Režie' | 'Scénář' | 'Kamera' | 'Hudba' | 'Hrají' | 'Produkce' | 'Casting' | 'Střih' | 'Zvuk' | 'Masky' | 'Předloha' | 'Scénografie' | 'Kostýmy';
|
|
62
|
+
type CSFDCreatorGroupsEnglish = 'Directed by' | 'Screenplay' | 'Cinematography' | 'Composer' | 'Cast' | 'Produced by' | 'Casting' | 'Editing' | 'Sound' | 'Make-up' | 'Production design' | 'Based on' | 'Costumes';
|
|
63
|
+
type CSFDCreatorGroupsSlovak = 'Réžia' | 'Scenár' | 'Kamera' | 'Hudba' | 'Hrajú' | 'Predloha' | 'Produkcia' | 'Strih' | 'Kostýmy' | 'Scénografia';
|
|
62
64
|
interface CSFDPremiere {
|
|
63
65
|
country: string;
|
|
64
66
|
format: string;
|
|
@@ -67,5 +69,5 @@ interface CSFDPremiere {
|
|
|
67
69
|
}
|
|
68
70
|
type CSFDBoxContent = 'Související' | 'Podobné';
|
|
69
71
|
//#endregion
|
|
70
|
-
export { CSFDBoxContent, CSFDCreatorGroups, CSFDCreators, CSFDGenres, CSFDMovie, CSFDMovieCreator, CSFDMovieListItem, CSFDPremiere, CSFDTitlesOther, CSFDVod, CSFDVodService };
|
|
72
|
+
export { CSFDBoxContent, CSFDCreatorGroups, CSFDCreatorGroupsEnglish, CSFDCreatorGroupsSlovak, CSFDCreators, CSFDGenres, CSFDMovie, CSFDMovieCreator, CSFDMovieListItem, CSFDPremiere, CSFDTitlesOther, CSFDVod, CSFDVodService };
|
|
71
73
|
//# sourceMappingURL=movie.d.ts.map
|
package/dto/options.d.ts
ADDED
package/dto/user-ratings.d.mts
CHANGED
|
@@ -16,8 +16,12 @@ interface CSFDUserRatingConfig {
|
|
|
16
16
|
* Delay on each page request. In milliseconds
|
|
17
17
|
*/
|
|
18
18
|
allPagesDelay?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Specific page number to fetch (e.g., 2 for second page)
|
|
21
|
+
*/
|
|
22
|
+
page?: number;
|
|
19
23
|
}
|
|
20
|
-
type
|
|
24
|
+
type CSFDColors = 'lightgrey' | 'blue' | 'red' | 'grey';
|
|
21
25
|
//#endregion
|
|
22
|
-
export { CSFDUserRatingConfig, CSFDUserRatings
|
|
26
|
+
export { CSFDColors, CSFDUserRatingConfig, CSFDUserRatings };
|
|
23
27
|
//# sourceMappingURL=user-ratings.d.mts.map
|
package/dto/user-ratings.d.ts
CHANGED
|
@@ -16,8 +16,12 @@ interface CSFDUserRatingConfig {
|
|
|
16
16
|
* Delay on each page request. In milliseconds
|
|
17
17
|
*/
|
|
18
18
|
allPagesDelay?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Specific page number to fetch (e.g., 2 for second page)
|
|
21
|
+
*/
|
|
22
|
+
page?: number;
|
|
19
23
|
}
|
|
20
|
-
type
|
|
24
|
+
type CSFDColors = 'lightgrey' | 'blue' | 'red' | 'grey';
|
|
21
25
|
//#endregion
|
|
22
|
-
export { CSFDUserRatingConfig, CSFDUserRatings
|
|
26
|
+
export { CSFDColors, CSFDUserRatingConfig, CSFDUserRatings };
|
|
23
27
|
//# sourceMappingURL=user-ratings.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSFDFilmTypes, CSFDScreening, CSFDStars } from "./global.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/dto/user-reviews.d.ts
|
|
4
|
+
interface CSFDUserReviews extends CSFDScreening {
|
|
5
|
+
userRating: CSFDStars;
|
|
6
|
+
userDate: string;
|
|
7
|
+
text: string;
|
|
8
|
+
poster: string;
|
|
9
|
+
}
|
|
10
|
+
interface CSFDUserReviewsConfig {
|
|
11
|
+
includesOnly?: CSFDFilmTypes[];
|
|
12
|
+
excludes?: CSFDFilmTypes[];
|
|
13
|
+
/**
|
|
14
|
+
* Fetch all reviews. (Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute)
|
|
15
|
+
*/
|
|
16
|
+
allPages?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Delay on each page request. In milliseconds
|
|
19
|
+
*/
|
|
20
|
+
allPagesDelay?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Specific page number to fetch (e.g., 2 for second page)
|
|
23
|
+
*/
|
|
24
|
+
page?: number;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { CSFDUserReviews, CSFDUserReviewsConfig };
|
|
28
|
+
//# sourceMappingURL=user-reviews.d.mts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSFDFilmTypes, CSFDScreening, CSFDStars } from "./global.js";
|
|
2
|
+
|
|
3
|
+
//#region src/dto/user-reviews.d.ts
|
|
4
|
+
interface CSFDUserReviews extends CSFDScreening {
|
|
5
|
+
userRating: CSFDStars;
|
|
6
|
+
userDate: string;
|
|
7
|
+
text: string;
|
|
8
|
+
poster: string;
|
|
9
|
+
}
|
|
10
|
+
interface CSFDUserReviewsConfig {
|
|
11
|
+
includesOnly?: CSFDFilmTypes[];
|
|
12
|
+
excludes?: CSFDFilmTypes[];
|
|
13
|
+
/**
|
|
14
|
+
* Fetch all reviews. (Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute)
|
|
15
|
+
*/
|
|
16
|
+
allPages?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Delay on each page request. In milliseconds
|
|
19
|
+
*/
|
|
20
|
+
allPagesDelay?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Specific page number to fetch (e.g., 2 for second page)
|
|
23
|
+
*/
|
|
24
|
+
page?: number;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { CSFDUserReviews, CSFDUserReviewsConfig };
|
|
28
|
+
//# sourceMappingURL=user-reviews.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cinema.helper.js","names":["classes: string[]","parseColor","parseIdFromUrl","metaConvert: CSFDCinemaMeta[]"],"sources":["../../src/helpers/cinema.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCinemaGroupedFilmsByDate, CSFDCinemaMeta, CSFDCinemaMovie } from '../dto/cinema';\nimport { CSFDColorRating } from '../dto/global';\nimport {
|
|
1
|
+
{"version":3,"file":"cinema.helper.js","names":["classes: string[]","parseColor","parseIdFromUrl","metaConvert: CSFDCinemaMeta[]"],"sources":["../../src/helpers/cinema.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCinemaGroupedFilmsByDate, CSFDCinemaMeta, CSFDCinemaMovie } from '../dto/cinema';\nimport { CSFDColorRating } from '../dto/global';\nimport { CSFDColors } from '../dto/user-ratings';\nimport { parseColor, parseIdFromUrl } from './global.helper';\n\nexport const getCinemaColorRating = (el: HTMLElement | null): CSFDColorRating => {\n const classes: string[] = el?.classNames.split(' ') ?? [];\n const last = classes.length ? classes[classes.length - 1] : undefined;\n return last ? parseColor(last as CSFDColors) : 'unknown';\n};\n\nexport const getCinemaId = (el: HTMLElement | null): number => {\n const id = el?.id?.split('-')[1];\n return +id;\n};\n\nexport const getCinemaUrlId = (url: string | null | undefined): number | null => {\n if (!url) return null;\n return parseIdFromUrl(url);\n};\n\nexport const getCinemaCoords = (el: HTMLElement | null): { lat: number; lng: number } | null => {\n if (!el) return null;\n const linkMapsEl = el.querySelector('a[href*=\"q=\"]');\n if (!linkMapsEl) return null;\n\n const linkMaps = linkMapsEl.getAttribute('href');\n const [_, latLng] = linkMaps.split('q=');\n\n const coords = latLng.split(',');\n if (coords.length !== 2) return null;\n\n const lat = Number(coords[0]);\n const lng = Number(coords[1]);\n if (Number.isFinite(lat) && Number.isFinite(lng)) {\n return { lat, lng };\n }\n return null;\n};\n\nexport const getCinemaUrl = (el: HTMLElement | null): string => {\n if (!el) return '';\n return el.querySelector('.cinema-logo a')?.attributes.href ?? '';\n};\n\nexport const parseCinema = (el: HTMLElement | null): { city: string; name: string } => {\n const title = el.querySelector('header h2').innerText.trim();\n const [city, name] = title.split(' - ');\n return { city, name };\n};\n\nexport const getGroupedFilmsByDate = (el: HTMLElement | null): CSFDCinemaGroupedFilmsByDate[] => {\n const divs = el.querySelectorAll(':scope > div');\n const getDatesAndFilms = divs\n .map((_, index) => index)\n .filter((index) => index % 2 === 0)\n .map((index) => {\n const [date, films] = divs.slice(index, index + 2);\n const dateText = date?.firstChild?.textContent?.trim() ?? null;\n return { date: dateText, films: getCinemaFilms('', films) };\n });\n\n return getDatesAndFilms;\n};\n\nexport const getCinemaFilms = (date: string, el: HTMLElement | null): CSFDCinemaMovie[] => {\n const filmNodes = el.querySelectorAll('.cinema-table tr');\n\n const films = filmNodes.map((filmNode) => {\n const url = filmNode.querySelector('td.name h3 a')?.attributes.href;\n const id = url ? getCinemaUrlId(url) : null;\n const title = filmNode.querySelector('.name h3')?.text.trim();\n const colorRating = getCinemaColorRating(filmNode.querySelector('.name .icon'));\n const showTimes = filmNode.querySelectorAll('.td-time')?.map((x) => x.textContent.trim());\n const meta = filmNode.querySelectorAll('.td-title span')?.map((x) => x.text.trim());\n\n return {\n id,\n title,\n url,\n colorRating,\n showTimes,\n meta: parseMeta(meta)\n };\n });\n return films;\n};\n\nexport const parseMeta = (meta: string[]): CSFDCinemaMeta[] => {\n const metaConvert: CSFDCinemaMeta[] = [];\n\n for (const element of meta) {\n if (element === 'T') {\n metaConvert.push('subtitles');\n } else if (element === 'D') {\n metaConvert.push('dubbing');\n } else {\n metaConvert.push(element);\n }\n }\n\n return metaConvert;\n};\n"],"mappings":";;;AAMA,MAAa,wBAAwB,OAA4C;CAC/E,MAAMA,UAAoB,IAAI,WAAW,MAAM,IAAI,IAAI,EAAE;CACzD,MAAM,OAAO,QAAQ,SAAS,QAAQ,QAAQ,SAAS,KAAK;AAC5D,QAAO,OAAOC,iCAAW,KAAmB,GAAG;;AAGjD,MAAa,eAAe,OAAmC;AAE7D,QAAO,CADI,IAAI,IAAI,MAAM,IAAI,CAAC;;AAIhC,MAAa,kBAAkB,QAAkD;AAC/E,KAAI,CAAC,IAAK,QAAO;AACjB,QAAOC,qCAAe,IAAI;;AAG5B,MAAa,mBAAmB,OAAgE;AAC9F,KAAI,CAAC,GAAI,QAAO;CAChB,MAAM,aAAa,GAAG,cAAc,kBAAgB;AACpD,KAAI,CAAC,WAAY,QAAO;CAGxB,MAAM,CAAC,GAAG,UADO,WAAW,aAAa,OAAO,CACnB,MAAM,KAAK;CAExC,MAAM,SAAS,OAAO,MAAM,IAAI;AAChC,KAAI,OAAO,WAAW,EAAG,QAAO;CAEhC,MAAM,MAAM,OAAO,OAAO,GAAG;CAC7B,MAAM,MAAM,OAAO,OAAO,GAAG;AAC7B,KAAI,OAAO,SAAS,IAAI,IAAI,OAAO,SAAS,IAAI,CA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B,KAAI,YAAY,IACd,aAAY,KAAK,YAAY;UACpB,YAAY,IACrB,aAAY,KAAK,UAAU;KAE3B,aAAY,KAAK,QAAQ;AAI7B,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cinema.helper.mjs","names":["classes: string[]","metaConvert: CSFDCinemaMeta[]"],"sources":["../../src/helpers/cinema.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCinemaGroupedFilmsByDate, CSFDCinemaMeta, CSFDCinemaMovie } from '../dto/cinema';\nimport { CSFDColorRating } from '../dto/global';\nimport {
|
|
1
|
+
{"version":3,"file":"cinema.helper.mjs","names":["classes: string[]","metaConvert: CSFDCinemaMeta[]"],"sources":["../../src/helpers/cinema.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCinemaGroupedFilmsByDate, CSFDCinemaMeta, CSFDCinemaMovie } from '../dto/cinema';\nimport { CSFDColorRating } from '../dto/global';\nimport { CSFDColors } from '../dto/user-ratings';\nimport { parseColor, parseIdFromUrl } from './global.helper';\n\nexport const getCinemaColorRating = (el: HTMLElement | null): CSFDColorRating => {\n const classes: string[] = el?.classNames.split(' ') ?? [];\n const last = classes.length ? classes[classes.length - 1] : undefined;\n return last ? parseColor(last as CSFDColors) : 'unknown';\n};\n\nexport const getCinemaId = (el: HTMLElement | null): number => {\n const id = el?.id?.split('-')[1];\n return +id;\n};\n\nexport const getCinemaUrlId = (url: string | null | undefined): number | null => {\n if (!url) return null;\n return parseIdFromUrl(url);\n};\n\nexport const getCinemaCoords = (el: HTMLElement | null): { lat: number; lng: number } | null => {\n if (!el) return null;\n const linkMapsEl = el.querySelector('a[href*=\"q=\"]');\n if (!linkMapsEl) return null;\n\n const linkMaps = linkMapsEl.getAttribute('href');\n const [_, latLng] = linkMaps.split('q=');\n\n const coords = latLng.split(',');\n if (coords.length !== 2) return null;\n\n const lat = Number(coords[0]);\n const lng = Number(coords[1]);\n if (Number.isFinite(lat) && Number.isFinite(lng)) {\n return { lat, lng };\n }\n return null;\n};\n\nexport const getCinemaUrl = (el: HTMLElement | null): string => {\n if (!el) return '';\n return el.querySelector('.cinema-logo a')?.attributes.href ?? '';\n};\n\nexport const parseCinema = (el: HTMLElement | null): { city: string; name: string } => {\n const title = el.querySelector('header h2').innerText.trim();\n const [city, name] = title.split(' - ');\n return { city, name };\n};\n\nexport const getGroupedFilmsByDate = (el: HTMLElement | null): CSFDCinemaGroupedFilmsByDate[] => {\n const divs = el.querySelectorAll(':scope > div');\n const getDatesAndFilms = divs\n .map((_, index) => index)\n .filter((index) => index % 2 === 0)\n .map((index) => {\n const [date, films] = divs.slice(index, index + 2);\n const dateText = date?.firstChild?.textContent?.trim() ?? null;\n return { date: dateText, films: getCinemaFilms('', films) };\n });\n\n return getDatesAndFilms;\n};\n\nexport const getCinemaFilms = (date: string, el: HTMLElement | null): CSFDCinemaMovie[] => {\n const filmNodes = el.querySelectorAll('.cinema-table tr');\n\n const films = filmNodes.map((filmNode) => {\n const url = filmNode.querySelector('td.name h3 a')?.attributes.href;\n const id = url ? getCinemaUrlId(url) : null;\n const title = filmNode.querySelector('.name h3')?.text.trim();\n const colorRating = getCinemaColorRating(filmNode.querySelector('.name .icon'));\n const showTimes = filmNode.querySelectorAll('.td-time')?.map((x) => x.textContent.trim());\n const meta = filmNode.querySelectorAll('.td-title span')?.map((x) => x.text.trim());\n\n return {\n id,\n title,\n url,\n colorRating,\n showTimes,\n meta: parseMeta(meta)\n };\n });\n return films;\n};\n\nexport const parseMeta = (meta: string[]): CSFDCinemaMeta[] => {\n const metaConvert: CSFDCinemaMeta[] = [];\n\n for (const element of meta) {\n if (element === 'T') {\n metaConvert.push('subtitles');\n } else if (element === 'D') {\n metaConvert.push('dubbing');\n } else {\n metaConvert.push(element);\n }\n }\n\n return metaConvert;\n};\n"],"mappings":";;;AAMA,MAAa,wBAAwB,OAA4C;CAC/E,MAAMA,UAAoB,IAAI,WAAW,MAAM,IAAI,IA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,MAAM,IAAI;GACjC,OAAO,eAAe,IAAI,MAAM;GAAE;GAC3D;;AAKN,MAAa,kBAAkB,MAAc,OAA8C;AAoBzF,QAnBkB,GAAG,iBAAiB,mBAAmB,CAEjC,KAAK,aAAa;EACxC,MAAM,MAAM,SAAS,cAAc,eAAe,EAAE,WAAW;EAC/D,MAAM,KAAK,MAAM,eAAe,IAAI,GAAG;EACvC,MAAM,QAAQ,SAAS,cAAc,WAAW,EAAE,KAAK,MAAM;EAC7D,MAAM,cAAc,qBAAqB,SAAS,cAAc,cAAc,CAAC;EAC/E,MAAM,YAAY,SAAS,iBAAiB,WAAW,EAAE,KAAK,MAAM,EAAE,YAAY,MAAM,CAAC;EACzF,MAAM,OAAO,SAAS,iBAAiB,iBAAiB,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,CAAC;AAEnF,SAAO;GACL;GACA;GACA;GACA;GACA;GACA,MAAM,UAAU,KAAK;GACtB;GACD;;AAIJ,MAAa,aAAa,SAAqC;CAC7D,MAAMC,cAAgC,EAAE;AAExC,MAAK,MAAM,WAAW,KACpB,KAAI,YAAY,IACd,aAAY,KAAK,YAAY;UACpB,YAAY,IACrB,aAAY,KAAK,UAAU;KAE3B,aAAY,KAAK,QAAQ;AAI7B,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creator.helper.js","names":["classes: string[]","parseColor","parseIdFromUrl","birthday: string","addProtocol","yearCache: number | null"],"sources":["../../src/helpers/creator.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCreatorScreening } from '../dto/creator';\nimport { CSFDColorRating } from '../dto/global';\nimport {
|
|
1
|
+
{"version":3,"file":"creator.helper.js","names":["classes: string[]","parseColor","parseIdFromUrl","birthday: string","addProtocol","yearCache: number | null"],"sources":["../../src/helpers/creator.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCreatorScreening } from '../dto/creator';\nimport { CSFDColorRating } from '../dto/global';\nimport { CSFDColors } from '../dto/user-ratings';\nimport { addProtocol, parseColor, parseIdFromUrl } from './global.helper';\n\nconst getCreatorColorRating = (el: HTMLElement | null): CSFDColorRating => {\n const classes: string[] = el?.classNames.split(' ') ?? [];\n const last = classes[classes.length - 1] as CSFDColors | undefined;\n return parseColor(last);\n};\n\nexport const getCreatorId = (url: string | null | undefined): number | null => {\n return url ? parseIdFromUrl(url) : null;\n};\n\nexport const getCreatorName = (el: HTMLElement | null): string | null => {\n const h1 = el?.querySelector('h1');\n return h1?.innerText?.trim() ?? null;\n};\n\nexport const getCreatorBirthdayInfo = (\n el: HTMLElement | null\n): { birthday: string; age: number; birthPlace: string } => {\n const infoBlock = el.querySelector('h1 + p');\n const text = infoBlock?.innerHTML.trim();\n\n const birthPlaceRow = infoBlock?.querySelector('.info-place')?.innerHTML.trim();\n const ageRow = infoBlock?.querySelector('.info')?.innerHTML.trim();\n\n let birthday: string = '';\n\n if (text) {\n const parts = text.split('\\n');\n const birthdayRow = parts.find((x) => x.includes('nar.'));\n birthday = birthdayRow ? parseBirthday(birthdayRow) : '';\n }\n\n const age = ageRow ? +parseAge(ageRow) : null;\n const birthPlace = birthPlaceRow ? parseBirthPlace(birthPlaceRow) : '';\n\n return { birthday, age, birthPlace };\n};\n\nexport const getCreatorBio = (el: HTMLElement | null): string | null => {\n const p = el?.querySelector('.article-content p');\n const first = p?.text?.trim().split('\\n')[0]?.trim();\n return first || null;\n};\n\nexport const getCreatorPhoto = (el: HTMLElement | null): string | null => {\n const src = el?.querySelector('img')?.getAttribute('src');\n return src ? addProtocol(src) : null;\n};\n\nconst parseBirthday = (text: string): string => text.replace(/nar\\./g, '').trim();\n\nconst parseAge = (text: string): number | null => {\n const digits = text.replace(/[^\\d]/g, '');\n return digits ? Number(digits) : null;\n};\n\nconst parseBirthPlace = (text: string): string =>\n text.trim().replace(/<br>/g, '').trim();\n\n\nexport const getCreatorFilms = (el: HTMLElement | null): CSFDCreatorScreening[] => {\n const filmNodes = el?.querySelectorAll('.box')?.[0]?.querySelectorAll('table tr') ?? [];\n let yearCache: number | null = null;\n const films = filmNodes.map((filmNode) => {\n const id = getCreatorId(filmNode.querySelector('td.name .film-title-name')?.attributes?.href);\n const title = filmNode.querySelector('.name')?.text?.trim();\n const yearText = filmNode.querySelector('.year')?.text?.trim();\n const year = yearText ? +yearText : null;\n const colorRating = getCreatorColorRating(filmNode.querySelector('.name .icon'));\n\n // Cache year from previous film because there is a gap between movies with same year\n if (typeof year === 'number' && !isNaN(year)) {\n yearCache = +year;\n }\n\n const finalYear = year ?? yearCache;\n if (id != null && title && finalYear != null) {\n return { id, title, year: finalYear, colorRating };\n }\n return null;\n });\n // Remove empty objects\n const filmsUnique = films.filter(Boolean) as CSFDCreatorScreening[];\n return filmsUnique;\n};\n"],"mappings":";;;AAMA,MAAM,yBAAyB,OAA4C;CACzE,MAAMA,UAAoB,IAAI,WAAW,MAAM,IAAI,IAAI,EAAE;CACzD,MAAM,OAAO,QAAQ,QAAQ,SAAS;AACtC,QAAOC,iCAAW,KAAK;;AAGzB,MAAa,gBAAgB,QAAkD;AAC7E,QAAO,MAAMC,qCAAe,IAAI,GAAG;;AAGrC,MAAa,kBAAkB,OAA0C;AAEvE,SADW,IAAI,cAAc,KAAK,GACvB,WAAW,MAAM,IAAI;;AAGlC,MAAa,0BACX,OAC0D;CAC1D,MAAM,YAAY,GAAG,cAAc,SAAS;CAC5C,MAAM,OAAO,WAAW,UAAU,MAAM;CAExC,MAAM,gBAAgB,WAAW,cAAc,cAAc,EAAE,UAAU,MAAM;CAC/E,MAAM,SAAS,WAAW,cAAc,QAAQ,EAAE,UAAU,MAAM;CAElE,IAAIC,WAAmB;AAEvB,KAAI,MAAM;EAER,MAAM,cADQ,KAAK,MAAM,KAAK,CACJ,MAAM,MAAM,EAAE,SAAS,OAAO,CAAC;AACzD,aAAW,cAAc,cAAc,YAAY,GAAG;;CAGxD,MAAM,MAAM,SAAS,CAAC,SAAS,OAAO,GAAG;CACzC,MAAM,a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
|
|
|
1
|
-
{"version":3,"file":"creator.helper.mjs","names":["classes: string[]","birthday: string","yearCache: number | null"],"sources":["../../src/helpers/creator.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCreatorScreening } from '../dto/creator';\nimport { CSFDColorRating } from '../dto/global';\nimport {
|
|
1
|
+
{"version":3,"file":"creator.helper.mjs","names":["classes: string[]","birthday: string","yearCache: number | null"],"sources":["../../src/helpers/creator.helper.ts"],"sourcesContent":["import { HTMLElement } from 'node-html-parser';\nimport { CSFDCreatorScreening } from '../dto/creator';\nimport { CSFDColorRating } from '../dto/global';\nimport { CSFDColors } from '../dto/user-ratings';\nimport { addProtocol, parseColor, parseIdFromUrl } from './global.helper';\n\nconst getCreatorColorRating = (el: HTMLElement | null): CSFDColorRating => {\n const classes: string[] = el?.classNames.split(' ') ?? [];\n const last = classes[classes.length - 1] as CSFDColors | undefined;\n return parseColor(last);\n};\n\nexport const getCreatorId = (url: string | null | undefined): number | null => {\n return url ? parseIdFromUrl(url) : null;\n};\n\nexport const getCreatorName = (el: HTMLElement | null): string | null => {\n const h1 = el?.querySelector('h1');\n return h1?.innerText?.trim() ?? null;\n};\n\nexport const getCreatorBirthdayInfo = (\n el: HTMLElement | null\n): { birthday: string; age: number; birthPlace: string } => {\n const infoBlock = el.querySelector('h1 + p');\n const text = infoBlock?.innerHTML.trim();\n\n const birthPlaceRow = infoBlock?.querySelector('.info-place')?.innerHTML.trim();\n const ageRow = infoBlock?.querySelector('.info')?.innerHTML.trim();\n\n let birthday: string = '';\n\n if (text) {\n const parts = text.split('\\n');\n const birthdayRow = parts.find((x) => x.includes('nar.'));\n birthday = birthdayRow ? parseBirthday(birthdayRow) : '';\n }\n\n const age = ageRow ? +parseAge(ageRow) : null;\n const birthPlace = birthPlaceRow ? parseBirthPlace(birthPlaceRow) : '';\n\n return { birthday, age, birthPlace };\n};\n\nexport const getCreatorBio = (el: HTMLElement | null): string | null => {\n const p = el?.querySelector('.article-content p');\n const first = p?.text?.trim().split('\\n')[0]?.trim();\n return first || null;\n};\n\nexport const getCreatorPhoto = (el: HTMLElement | null): string | null => {\n const src = el?.querySelector('img')?.getAttribute('src');\n return src ? addProtocol(src) : null;\n};\n\nconst parseBirthday = (text: string): string => text.replace(/nar\\./g, '').trim();\n\nconst parseAge = (text: string): number | null => {\n const digits = text.replace(/[^\\d]/g, '');\n return digits ? Number(digits) : null;\n};\n\nconst parseBirthPlace = (text: string): string =>\n text.trim().replace(/<br>/g, '').trim();\n\n\nexport const getCreatorFilms = (el: HTMLElement | null): CSFDCreatorScreening[] => {\n const filmNodes = el?.querySelectorAll('.box')?.[0]?.querySelectorAll('table tr') ?? [];\n let yearCache: number | null = null;\n const films = filmNodes.map((filmNode) => {\n const id = getCreatorId(filmNode.querySelector('td.name .film-title-name')?.attributes?.href);\n const title = filmNode.querySelector('.name')?.text?.trim();\n const yearText = filmNode.querySelector('.year')?.text?.trim();\n const year = yearText ? +yearText : null;\n const colorRating = getCreatorColorRating(filmNode.querySelector('.name .icon'));\n\n // Cache year from previous film because there is a gap between movies with same year\n if (typeof year === 'number' && !isNaN(year)) {\n yearCache = +year;\n }\n\n const finalYear = year ?? yearCache;\n if (id != null && title && finalYear != null) {\n return { id, title, year: finalYear, colorRating };\n }\n return null;\n });\n // Remove empty objects\n const filmsUnique = films.filter(Boolean) as CSFDCreatorScreening[];\n return filmsUnique;\n};\n"],"mappings":";;;AAMA,MAAM,yBAAyB,OAA4C;CACzE,MAAMA,UAAoB,IAAI,WAAW,MAAM,IAAI,IAAI,EAAE;CACzD,MAAM,OAAO,QAAQ,QAAQ,SAAS;AACtC,QAAO,WAAW,KAAK;;AAGzB,MAAa,gBAAgB,QAAkD;AAC7E,QAAO,MAAM,eAAe,IAAI,GAAG;;AAGrC,MAAa,kBAAkB,OAA0C;AAEvE,SADW,IAAI,cAAc,KAAK,GACvB,WAAW,MAAM,IAAI;;AAGlC,MAAa,0BACX,OAC0D;CAC1D,MAAM,YAAY,GAAG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,MAAM,WAAW,SAAS,cAAc,QAAQ,EAAE,MAAM,MAAM;EAC9D,MAAM,OAAO,WAAW,CAAC,WAAW;EACpC,MAAM,cAAc,sBAAsB,SAAS,cAAc,cAAc,CAAC;AAGhF,MAAI,OAAO,SAAS,YAAY,CAAC,MAAM,KAAK,CAC1C,aAAY,CAAC;EAGf,MAAM,YAAY,QAAQ;AAC1B,MAAI,MAAM,QAAQ,SAAS,aAAa,KACtC,QAAO;GAAE;GAAI;GAAO,MAAM;GAAW;GAAa;AAEpD,SAAO;GACP,CAEwB,OAAO,QAAQ"}
|
package/helpers/global.helper.js
CHANGED
|
@@ -40,6 +40,7 @@ const getDuration = (matches) => {
|
|
|
40
40
|
const parseISO8601Duration = (iso) => {
|
|
41
41
|
return +getDuration(iso.match(/(-)?P(?:([.,\d]+)Y)?(?:([.,\d]+)M)?(?:([.,\d]+)W)?(?:([.,\d]+)D)?T(?:([.,\d]+)H)?(?:([.,\d]+)M)?(?:([.,\d]+)S)?/)).minutes;
|
|
42
42
|
};
|
|
43
|
+
const sleep = (ms) => new Promise((res) => setTimeout(res, ms));
|
|
43
44
|
|
|
44
45
|
//#endregion
|
|
45
46
|
exports.addProtocol = addProtocol;
|
|
@@ -47,4 +48,5 @@ exports.getColor = getColor;
|
|
|
47
48
|
exports.parseColor = parseColor;
|
|
48
49
|
exports.parseISO8601Duration = parseISO8601Duration;
|
|
49
50
|
exports.parseIdFromUrl = parseIdFromUrl;
|
|
51
|
+
exports.sleep = sleep;
|
|
50
52
|
//# sourceMappingURL=global.helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.helper.js","names":[],"sources":["../../src/helpers/global.helper.ts"],"sourcesContent":["import { CSFDColorRating } from '../dto/global';\nimport {
|
|
1
|
+
{"version":3,"file":"global.helper.js","names":[],"sources":["../../src/helpers/global.helper.ts"],"sourcesContent":["import { CSFDColorRating } from '../dto/global';\nimport { CSFDColors } from '../dto/user-ratings';\n\nexport const parseIdFromUrl = (url: string): number => {\n if (url) {\n const idSlug = url?.split('/')[2];\n const id = idSlug?.split('-')[0];\n return +id || null;\n } else {\n return null;\n }\n};\n\nexport const getColor = (cls: string): CSFDColorRating => {\n switch (cls) {\n case 'page-lightgrey':\n return 'unknown';\n case 'page-red':\n return 'good';\n case 'page-blue':\n return 'average';\n case 'page-grey':\n return 'bad';\n default:\n return 'unknown';\n }\n};\n\nexport const parseColor = (quality: CSFDColors): CSFDColorRating => {\n switch (quality) {\n case 'lightgrey':\n return 'unknown';\n case 'red':\n return 'good';\n case 'blue':\n return 'average';\n case 'grey':\n return 'bad';\n default:\n return 'unknown';\n }\n};\n\nexport const addProtocol = (url: string): string => {\n return url.startsWith('//') ? 'https:' + url : url;\n};\n\nexport const getDuration = (matches: any[]) => {\n return {\n sign: matches[1] === undefined ? '+' : '-',\n years: matches[2] === undefined ? 0 : matches[2],\n months: matches[3] === undefined ? 0 : matches[3],\n weeks: matches[4] === undefined ? 0 : matches[4],\n days: matches[5] === undefined ? 0 : matches[5],\n hours: matches[6] === undefined ? 0 : matches[6],\n minutes: matches[7] === undefined ? 0 : matches[7],\n seconds: matches[8] === undefined ? 0 : matches[8]\n };\n};\n\nexport const parseISO8601Duration = (iso: string): number => {\n const iso8601DurationRegex =\n /(-)?P(?:([.,\\d]+)Y)?(?:([.,\\d]+)M)?(?:([.,\\d]+)W)?(?:([.,\\d]+)D)?T(?:([.,\\d]+)H)?(?:([.,\\d]+)M)?(?:([.,\\d]+)S)?/;\n\n const matches = iso.match(iso8601DurationRegex);\n\n const duration = getDuration(matches);\n\n return +duration.minutes;\n};\n\n// Sleep in loop\nexport const sleep = (ms: number) => new Promise((res) => setTimeout(res, ms));\n"],"mappings":";;AAGA,MAAa,kBAAkB,QAAwB;AACrD,KAAI,IAGF,QAAO,EAFQ,KAAK,MAAM,IAAI,CAAC,KACZ,MAAM,IAAI,CAAC,MAChB;KAEd,QAAO;;AAIX,MAAa,YAAY,QAAiC;AACxD,SAAQ,KAAR;EACE,KAAK,iBACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAa,cAAc,YAAyC;AAClE,SAAQ,SAAR;EACE,KAAK,YACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAa,eAAe,QAAwB;AAClD,QAAO,IAAI,WAAW,KAAK,GAAG,WAAW,MAAM;;AAGjD,MAAa,eAAe,YAAmB;AAC7C,QAAO;EACL,MAAM,QAAQ,OAAO,SAAY,MAAM;EACvC,OAAO,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC9C,QAAQ,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC/C,OAAO,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC9C,MAAM,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC7C,OAAO,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC9C,SAAS,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAChD,SAAS,QAAQ,OAAO,SAAY,IAAI,QAAQ;EACjD;;AAGH,MAAa,wBAAwB,QAAwB;AAQ3D,QAAO,CAFU,YAFD,IAAI,MAFlB,kHAE6C,CAEV,CAEpB;;AAInB,MAAa,SAAS,OAAe,IAAI,SAAS,QAAQ,WAAW,KAAK,GAAG,CAAC"}
|
|
@@ -39,7 +39,8 @@ const getDuration = (matches) => {
|
|
|
39
39
|
const parseISO8601Duration = (iso) => {
|
|
40
40
|
return +getDuration(iso.match(/(-)?P(?:([.,\d]+)Y)?(?:([.,\d]+)M)?(?:([.,\d]+)W)?(?:([.,\d]+)D)?T(?:([.,\d]+)H)?(?:([.,\d]+)M)?(?:([.,\d]+)S)?/)).minutes;
|
|
41
41
|
};
|
|
42
|
+
const sleep = (ms) => new Promise((res) => setTimeout(res, ms));
|
|
42
43
|
|
|
43
44
|
//#endregion
|
|
44
|
-
export { addProtocol, getColor, parseColor, parseISO8601Duration, parseIdFromUrl };
|
|
45
|
+
export { addProtocol, getColor, parseColor, parseISO8601Duration, parseIdFromUrl, sleep };
|
|
45
46
|
//# sourceMappingURL=global.helper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.helper.mjs","names":[],"sources":["../../src/helpers/global.helper.ts"],"sourcesContent":["import { CSFDColorRating } from '../dto/global';\nimport {
|
|
1
|
+
{"version":3,"file":"global.helper.mjs","names":[],"sources":["../../src/helpers/global.helper.ts"],"sourcesContent":["import { CSFDColorRating } from '../dto/global';\nimport { CSFDColors } from '../dto/user-ratings';\n\nexport const parseIdFromUrl = (url: string): number => {\n if (url) {\n const idSlug = url?.split('/')[2];\n const id = idSlug?.split('-')[0];\n return +id || null;\n } else {\n return null;\n }\n};\n\nexport const getColor = (cls: string): CSFDColorRating => {\n switch (cls) {\n case 'page-lightgrey':\n return 'unknown';\n case 'page-red':\n return 'good';\n case 'page-blue':\n return 'average';\n case 'page-grey':\n return 'bad';\n default:\n return 'unknown';\n }\n};\n\nexport const parseColor = (quality: CSFDColors): CSFDColorRating => {\n switch (quality) {\n case 'lightgrey':\n return 'unknown';\n case 'red':\n return 'good';\n case 'blue':\n return 'average';\n case 'grey':\n return 'bad';\n default:\n return 'unknown';\n }\n};\n\nexport const addProtocol = (url: string): string => {\n return url.startsWith('//') ? 'https:' + url : url;\n};\n\nexport const getDuration = (matches: any[]) => {\n return {\n sign: matches[1] === undefined ? '+' : '-',\n years: matches[2] === undefined ? 0 : matches[2],\n months: matches[3] === undefined ? 0 : matches[3],\n weeks: matches[4] === undefined ? 0 : matches[4],\n days: matches[5] === undefined ? 0 : matches[5],\n hours: matches[6] === undefined ? 0 : matches[6],\n minutes: matches[7] === undefined ? 0 : matches[7],\n seconds: matches[8] === undefined ? 0 : matches[8]\n };\n};\n\nexport const parseISO8601Duration = (iso: string): number => {\n const iso8601DurationRegex =\n /(-)?P(?:([.,\\d]+)Y)?(?:([.,\\d]+)M)?(?:([.,\\d]+)W)?(?:([.,\\d]+)D)?T(?:([.,\\d]+)H)?(?:([.,\\d]+)M)?(?:([.,\\d]+)S)?/;\n\n const matches = iso.match(iso8601DurationRegex);\n\n const duration = getDuration(matches);\n\n return +duration.minutes;\n};\n\n// Sleep in loop\nexport const sleep = (ms: number) => new Promise((res) => setTimeout(res, ms));\n"],"mappings":";AAGA,MAAa,kBAAkB,QAAwB;AACrD,KAAI,IAGF,QAAO,EAFQ,KAAK,MAAM,IAAI,CAAC,KACZ,MAAM,IAAI,CAAC,MAChB;KAEd,QAAO;;AAIX,MAAa,YAAY,QAAiC;AACxD,SAAQ,KAAR;EACE,KAAK,iBACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAa,cAAc,YAAyC;AAClE,SAAQ,SAAR;EACE,KAAK,YACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAa,eAAe,QAAwB;AAClD,QAAO,IAAI,WAAW,KAAK,GAAG,WAAW,MAAM;;AAGjD,MAAa,eAAe,YAAmB;AAC7C,QAAO;EACL,MAAM,QAAQ,OAAO,SAAY,MAAM;EACvC,OAAO,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC9C,QAAQ,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC/C,OAAO,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC9C,MAAM,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC7C,OAAO,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAC9C,SAAS,QAAQ,OAAO,SAAY,IAAI,QAAQ;EAChD,SAAS,QAAQ,OAAO,SAAY,IAAI,QAAQ;EACjD;;AAGH,MAAa,wBAAwB,QAAwB;AAQ3D,QAAO,CAFU,YAFD,IAAI,MAFlB,kHAE6C,CAEV,CAEpB;;AAInB,MAAa,SAAS,OAAe,IAAI,SAAS,QAAQ,WAAW,KAAK,GAAG,CAAC"}
|
package/helpers/movie.helper.js
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
const require_global_helper = require('./global.helper.js');
|
|
2
2
|
|
|
3
3
|
//#region src/helpers/movie.helper.ts
|
|
4
|
+
/**
|
|
5
|
+
* Maps language-specific movie creator group labels.
|
|
6
|
+
* @param language - The language code (e.g., 'en', 'cs')
|
|
7
|
+
* @param key - The key of the creator group (e.g., 'directors', 'writers')
|
|
8
|
+
* @returns The localized label for the creator group
|
|
9
|
+
*/
|
|
10
|
+
const getLocalizedCreatorLabel = (language, key) => {
|
|
11
|
+
const labels = {
|
|
12
|
+
en: {
|
|
13
|
+
directors: "Directed by",
|
|
14
|
+
writers: "Screenplay",
|
|
15
|
+
cinematography: "Cinematography",
|
|
16
|
+
music: "Composer",
|
|
17
|
+
actors: "Cast",
|
|
18
|
+
basedOn: "Based on",
|
|
19
|
+
producers: "Produced by",
|
|
20
|
+
filmEditing: "Editing",
|
|
21
|
+
costumeDesign: "Costumes",
|
|
22
|
+
productionDesign: "Production design",
|
|
23
|
+
casting: "Casting",
|
|
24
|
+
sound: "Sound",
|
|
25
|
+
makeup: "Make-up"
|
|
26
|
+
},
|
|
27
|
+
cs: {
|
|
28
|
+
directors: "Režie",
|
|
29
|
+
writers: "Scénář",
|
|
30
|
+
cinematography: "Kamera",
|
|
31
|
+
music: "Hudba",
|
|
32
|
+
actors: "Hrají",
|
|
33
|
+
basedOn: "Předloha",
|
|
34
|
+
producers: "Produkce",
|
|
35
|
+
filmEditing: "Střih",
|
|
36
|
+
costumeDesign: "Kostýmy",
|
|
37
|
+
productionDesign: "Scénografie",
|
|
38
|
+
casting: "Casting",
|
|
39
|
+
sound: "Zvuk",
|
|
40
|
+
makeup: "Masky"
|
|
41
|
+
},
|
|
42
|
+
sk: {
|
|
43
|
+
directors: "Réžia",
|
|
44
|
+
writers: "Scenár",
|
|
45
|
+
cinematography: "Kamera",
|
|
46
|
+
music: "Hudba",
|
|
47
|
+
actors: "Hrajú",
|
|
48
|
+
basedOn: "Predloha",
|
|
49
|
+
producers: "Produkcia",
|
|
50
|
+
filmEditing: "Strih",
|
|
51
|
+
costumeDesign: "Kostýmy",
|
|
52
|
+
productionDesign: "Scénografia",
|
|
53
|
+
casting: "Casting",
|
|
54
|
+
sound: "Zvuk",
|
|
55
|
+
makeup: "Masky"
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return (labels[language || "cs"] || labels["cs"])[key];
|
|
59
|
+
};
|
|
4
60
|
const getMovieTitle = (el) => {
|
|
5
61
|
return el.querySelector("h1").innerText.split(`(`)[0].trim();
|
|
6
62
|
};
|
|
@@ -140,6 +196,7 @@ const getMovieTags = (el) => {
|
|
|
140
196
|
};
|
|
141
197
|
|
|
142
198
|
//#endregion
|
|
199
|
+
exports.getLocalizedCreatorLabel = getLocalizedCreatorLabel;
|
|
143
200
|
exports.getMovieBoxMovies = getMovieBoxMovies;
|
|
144
201
|
exports.getMovieColorRating = getMovieColorRating;
|
|
145
202
|
exports.getMovieDescriptions = getMovieDescriptions;
|