node-csfd-api 3.0.0-next.26 → 3.0.0-next.28
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/cjs/fetchers/{index.js → fetchers.js} +2 -2
- package/cjs/helpers/cinema.helper.js +9 -7
- package/cjs/helpers/creator.helper.js +34 -35
- package/cjs/helpers/global.helper.js +12 -1
- package/cjs/helpers/movie.helper.js +85 -9
- package/cjs/helpers/search-user.helper.js +9 -4
- package/cjs/helpers/search.helper.js +6 -5
- package/cjs/helpers/user-ratings.helper.js +2 -2
- package/cjs/index.js +10 -10
- package/cjs/services/cinema.service.js +10 -10
- package/cjs/services/creator.service.js +16 -12
- package/cjs/services/movie.service.js +48 -35
- package/cjs/services/search.service.js +32 -32
- package/cjs/services/user-ratings.service.js +17 -17
- package/cjs/types.js +22 -0
- package/esm/fetchers/{index.js → fetchers.js} +1 -1
- package/esm/helpers/cinema.helper.js +9 -7
- package/esm/helpers/creator.helper.js +34 -35
- package/esm/helpers/global.helper.js +10 -0
- package/esm/helpers/movie.helper.js +73 -2
- package/esm/helpers/search-user.helper.js +8 -3
- package/esm/helpers/search.helper.js +3 -2
- package/esm/helpers/user-ratings.helper.js +1 -1
- package/esm/index.js +5 -5
- package/esm/services/cinema.service.js +3 -3
- package/esm/services/creator.service.js +8 -4
- package/esm/services/movie.service.js +21 -8
- package/esm/services/search.service.js +5 -5
- package/esm/services/user-ratings.service.js +3 -3
- package/esm/types.js +6 -0
- package/index.dto.d.ts +8 -7
- package/package.json +1 -1
- package/types/{interfaces/cinema.interface.d.ts → dto/cinema.d.ts} +1 -1
- package/types/{interfaces/movie.interface.d.ts → dto/movie.d.ts} +22 -1
- package/types/{interfaces/search.interface.d.ts → dto/search.d.ts} +1 -1
- package/types/helpers/cinema.helper.d.ts +4 -4
- package/types/helpers/creator.helper.d.ts +5 -5
- package/types/helpers/global.helper.d.ts +3 -2
- package/types/helpers/movie.helper.d.ts +16 -2
- package/types/helpers/search.helper.d.ts +2 -2
- package/types/helpers/user-ratings.helper.d.ts +1 -1
- package/types/index.d.ts +10 -10
- package/types/services/cinema.service.d.ts +1 -1
- package/types/services/creator.service.d.ts +1 -1
- package/types/services/movie.service.d.ts +1 -1
- package/types/services/search.service.d.ts +1 -1
- package/types/services/user-ratings.service.d.ts +1 -1
- package/types/types.d.ts +6 -0
- package/types/vars.d.ts +1 -1
- /package/cjs/{interfaces/cinema.interface.js → dto/cinema.js} +0 -0
- /package/cjs/{interfaces/creator.interface.js → dto/creator.js} +0 -0
- /package/cjs/{interfaces → dto}/global.js +0 -0
- /package/cjs/{interfaces/movie.interface.js → dto/movie.js} +0 -0
- /package/cjs/{interfaces/search.interface.js → dto/search.js} +0 -0
- /package/cjs/{interfaces/user-ratings.interface.js → dto/user-ratings.js} +0 -0
- /package/esm/{interfaces/cinema.interface.js → dto/cinema.js} +0 -0
- /package/esm/{interfaces/creator.interface.js → dto/creator.js} +0 -0
- /package/esm/{interfaces → dto}/global.js +0 -0
- /package/esm/{interfaces/movie.interface.js → dto/movie.js} +0 -0
- /package/esm/{interfaces/search.interface.js → dto/search.js} +0 -0
- /package/esm/{interfaces/user-ratings.interface.js → dto/user-ratings.js} +0 -0
- /package/types/{interfaces/creator.interface.d.ts → dto/creator.d.ts} +0 -0
- /package/types/{interfaces → dto}/global.d.ts +0 -0
- /package/types/{interfaces/user-ratings.interface.d.ts → dto/user-ratings.d.ts} +0 -0
- /package/types/fetchers/{index.d.ts → fetchers.d.ts} +0 -0
|
@@ -8,13 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { parse } from 'node-html-parser';
|
|
11
|
-
import { fetchPage } from '../fetchers';
|
|
12
|
-
import { getCreatorBio, getCreatorBirthdayInfo, getCreatorFilms, getCreatorName, getCreatorPhoto } from '../helpers/creator.helper';
|
|
13
|
-
import { creatorUrl } from '../vars';
|
|
11
|
+
import { fetchPage } from '../fetchers/fetchers.js';
|
|
12
|
+
import { getCreatorBio, getCreatorBirthdayInfo, getCreatorFilms, getCreatorName, getCreatorPhoto } from '../helpers/creator.helper.js';
|
|
13
|
+
import { creatorUrl } from '../vars.js';
|
|
14
14
|
export class CreatorScraper {
|
|
15
15
|
creator(creatorId) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const
|
|
17
|
+
const id = Number(creatorId);
|
|
18
|
+
if (isNaN(id)) {
|
|
19
|
+
throw new Error('node-csfd-api: creatorId must be a valid number');
|
|
20
|
+
}
|
|
21
|
+
const url = creatorUrl(id);
|
|
18
22
|
const response = yield fetchPage(url);
|
|
19
23
|
const creatorHtml = parse(response);
|
|
20
24
|
const asideNode = creatorHtml.querySelector('.creator-about');
|
|
@@ -8,13 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { parse } from 'node-html-parser';
|
|
11
|
-
import { fetchPage } from '../fetchers';
|
|
12
|
-
import { getMovieBoxMovies, getMovieColorRating, getMovieDescriptions, getMovieDuration, getMovieGenres, getMovieGroup, getMovieOrigins, getMoviePoster, getMoviePremieres, getMovieRandomPhoto, getMovieRating, getMovieRatingCount, getMovieTags, getMovieTitle, getMovieTitlesOther, getMovieTrivia, getMovieType, getMovieVods, getMovieYear } from '../helpers/movie.helper';
|
|
13
|
-
import { movieUrl } from '../vars';
|
|
11
|
+
import { fetchPage } from '../fetchers/fetchers.js';
|
|
12
|
+
import { detectSeasonOrEpisodeListType, getEpisodeCode, getMovieBoxMovies, getMovieColorRating, getMovieDescriptions, getMovieDuration, getMovieGenres, getMovieGroup, getMovieOrigins, getMoviePoster, getMoviePremieres, getMovieRandomPhoto, getMovieRating, getMovieRatingCount, getMovieTags, getMovieTitle, getMovieTitlesOther, getMovieTrivia, getMovieType, getMovieVods, getMovieYear, getSeasonorEpisodeParent, getSeasonsOrEpisodes, getSerieasAndSeasonTitle } from '../helpers/movie.helper.js';
|
|
13
|
+
import { movieUrl } from '../vars.js';
|
|
14
14
|
export class MovieScraper {
|
|
15
15
|
movie(movieId) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const
|
|
17
|
+
const id = Number(movieId);
|
|
18
|
+
if (isNaN(id)) {
|
|
19
|
+
throw new Error('node-csfd-api: movieId must be a valid number');
|
|
20
|
+
}
|
|
21
|
+
const url = movieUrl(id);
|
|
18
22
|
const response = yield fetchPage(url);
|
|
19
23
|
const movieHtml = parse(response);
|
|
20
24
|
const pageClasses = movieHtml.querySelector('.page-content').classNames.split(' ');
|
|
@@ -26,14 +30,18 @@ export class MovieScraper {
|
|
|
26
30
|
});
|
|
27
31
|
}
|
|
28
32
|
buildMovie(movieId, el, asideEl, pageClasses, jsonLd) {
|
|
33
|
+
const type = getMovieType(el);
|
|
34
|
+
const { seriesName = null, seasonName = null } = type === 'série' ? getSerieasAndSeasonTitle(el) : {};
|
|
35
|
+
const seasonOrEpisodeListType = detectSeasonOrEpisodeListType(el);
|
|
36
|
+
const title = type === 'série' && seriesName ? seriesName : getMovieTitle(el);
|
|
29
37
|
this.film = {
|
|
30
38
|
id: movieId,
|
|
31
|
-
title
|
|
39
|
+
title,
|
|
32
40
|
year: getMovieYear(jsonLd),
|
|
33
41
|
duration: getMovieDuration(jsonLd, el),
|
|
34
42
|
descriptions: getMovieDescriptions(el),
|
|
35
43
|
genres: getMovieGenres(el),
|
|
36
|
-
type
|
|
44
|
+
type,
|
|
37
45
|
url: movieUrl(movieId),
|
|
38
46
|
origins: getMovieOrigins(el),
|
|
39
47
|
colorRating: getMovieColorRating(pageClasses),
|
|
@@ -53,13 +61,18 @@ export class MovieScraper {
|
|
|
53
61
|
producers: getMovieGroup(el, 'Produkce'),
|
|
54
62
|
filmEditing: getMovieGroup(el, 'Střih'),
|
|
55
63
|
costumeDesign: getMovieGroup(el, 'Kostýmy'),
|
|
56
|
-
productionDesign: getMovieGroup(el, 'Scénografie')
|
|
64
|
+
productionDesign: getMovieGroup(el, 'Scénografie'),
|
|
57
65
|
},
|
|
58
66
|
vod: getMovieVods(asideEl),
|
|
59
67
|
tags: getMovieTags(asideEl),
|
|
60
68
|
premieres: getMoviePremieres(asideEl),
|
|
61
69
|
related: getMovieBoxMovies(asideEl, 'Související'),
|
|
62
|
-
similar: getMovieBoxMovies(asideEl, 'Podobné')
|
|
70
|
+
similar: getMovieBoxMovies(asideEl, 'Podobné'),
|
|
71
|
+
seasons: seasonOrEpisodeListType === 'seasons' ? getSeasonsOrEpisodes(el) : null,
|
|
72
|
+
episodes: seasonOrEpisodeListType === 'episodes' ? getSeasonsOrEpisodes(el) : null,
|
|
73
|
+
parent: (type === 'seriál') ? null : getSeasonorEpisodeParent(el, { id: movieId, name: title }),
|
|
74
|
+
episodeCode: type === 'epizoda' ? getEpisodeCode(el) : null,
|
|
75
|
+
seasonName,
|
|
63
76
|
};
|
|
64
77
|
}
|
|
65
78
|
}
|
|
@@ -8,11 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { parse } from 'node-html-parser';
|
|
11
|
-
import { fetchPage } from '../fetchers';
|
|
12
|
-
import { parseIdFromUrl } from '../helpers/global.helper';
|
|
13
|
-
import { getAvatar, getUser, getUserRealName, getUserUrl } from '../helpers/search-user.helper';
|
|
14
|
-
import { getSearchColorRating, getSearchOrigins, getSearchPoster, getSearchTitle, getSearchType, getSearchUrl, getSearchYear, parseSearchPeople } from '../helpers/search.helper';
|
|
15
|
-
import { searchUrl } from '../vars';
|
|
11
|
+
import { fetchPage } from '../fetchers/fetchers.js';
|
|
12
|
+
import { parseIdFromUrl } from '../helpers/global.helper.js';
|
|
13
|
+
import { getAvatar, getUser, getUserRealName, getUserUrl } from '../helpers/search-user.helper.js';
|
|
14
|
+
import { getSearchColorRating, getSearchOrigins, getSearchPoster, getSearchTitle, getSearchType, getSearchUrl, getSearchYear, parseSearchPeople } from '../helpers/search.helper.js';
|
|
15
|
+
import { searchUrl } from '../vars.js';
|
|
16
16
|
export class SearchScraper {
|
|
17
17
|
search(text) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -8,9 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { parse } from 'node-html-parser';
|
|
11
|
-
import { fetchPage } from '../fetchers';
|
|
12
|
-
import { getUserRating, getUserRatingColorRating, getUserRatingDate, getUserRatingId, getUserRatingTitle, getUserRatingType, getUserRatingUrl, getUserRatingYear, sleep } from '../helpers/user-ratings.helper';
|
|
13
|
-
import { userRatingsUrl } from '../vars';
|
|
11
|
+
import { fetchPage } from '../fetchers/fetchers.js';
|
|
12
|
+
import { getUserRating, getUserRatingColorRating, getUserRatingDate, getUserRatingId, getUserRatingTitle, getUserRatingType, getUserRatingUrl, getUserRatingYear, sleep } from '../helpers/user-ratings.helper.js';
|
|
13
|
+
import { userRatingsUrl } from '../vars.js';
|
|
14
14
|
export class UserRatingsScraper {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.films = [];
|
package/esm/types.js
ADDED
package/index.dto.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
export * from "./types/index";
|
|
2
|
+
export * from "./types/types";
|
|
2
3
|
export * from "./types/vars";
|
|
4
|
+
export * from "./types/dto/cinema";
|
|
5
|
+
export * from "./types/dto/creator";
|
|
6
|
+
export * from "./types/dto/global";
|
|
7
|
+
export * from "./types/dto/movie";
|
|
8
|
+
export * from "./types/dto/search";
|
|
9
|
+
export * from "./types/dto/user-ratings";
|
|
3
10
|
export * from "./types/fetchers/fetch.polyfill";
|
|
4
|
-
export * from "./types/fetchers/
|
|
11
|
+
export * from "./types/fetchers/fetchers";
|
|
5
12
|
export * from "./types/helpers/cinema.helper";
|
|
6
13
|
export * from "./types/helpers/creator.helper";
|
|
7
14
|
export * from "./types/helpers/global.helper";
|
|
@@ -9,12 +16,6 @@ export * from "./types/helpers/movie.helper";
|
|
|
9
16
|
export * from "./types/helpers/search-user.helper";
|
|
10
17
|
export * from "./types/helpers/search.helper";
|
|
11
18
|
export * from "./types/helpers/user-ratings.helper";
|
|
12
|
-
export * from "./types/interfaces/cinema.interface";
|
|
13
|
-
export * from "./types/interfaces/creator.interface";
|
|
14
|
-
export * from "./types/interfaces/global";
|
|
15
|
-
export * from "./types/interfaces/movie.interface";
|
|
16
|
-
export * from "./types/interfaces/search.interface";
|
|
17
|
-
export * from "./types/interfaces/user-ratings.interface";
|
|
18
19
|
export * from "./types/services/cinema.service";
|
|
19
20
|
export * from "./types/services/creator.service";
|
|
20
21
|
export * from "./types/services/movie.service";
|
package/package.json
CHANGED
|
@@ -16,8 +16,23 @@ export interface CSFDMovie extends CSFDScreening {
|
|
|
16
16
|
premieres: CSFDPremiere[];
|
|
17
17
|
related: CSFDMovieListItem[];
|
|
18
18
|
similar: CSFDMovieListItem[];
|
|
19
|
+
seasons: CSFDSeason[] | null;
|
|
20
|
+
episodes: CSFDSeason[] | null;
|
|
21
|
+
parent: CSFDParent | null;
|
|
22
|
+
episodeCode: string | null;
|
|
23
|
+
seasonName: string | null;
|
|
19
24
|
}
|
|
20
|
-
export
|
|
25
|
+
export interface CSFDParent {
|
|
26
|
+
season: {
|
|
27
|
+
id: number;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
series: {
|
|
31
|
+
id: number;
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export type CSFDVodService = 'Netflix' | 'hbogo' | 'Prime Video' | 'Apple TV+' | 'iTunes' | 'KVIFF.TV' | 'Edisonline' | 'o2tv' | 'SledovaniTV' | 'Starmax' | 'DAFilms' | 'FILMY ČESKY A ZADARMO' | 'Youtube Česká filmová klasika' | 'VAPET' | 'VOREL FILM' | 'ivysilani' | 'Google Play' | 'Voyo' | 'YouTube Movies' | 'prima+' | 'Lepší.TV' | 'Blu-ray' | 'DVD';
|
|
21
36
|
export interface CSFDVod {
|
|
22
37
|
title: CSFDVodService;
|
|
23
38
|
url: string;
|
|
@@ -64,3 +79,9 @@ export interface CSFDPremiere {
|
|
|
64
79
|
company: string;
|
|
65
80
|
}
|
|
66
81
|
export type CSFDBoxContent = 'Související' | 'Podobné';
|
|
82
|
+
export interface CSFDSeason {
|
|
83
|
+
id: number;
|
|
84
|
+
name: string;
|
|
85
|
+
url: string;
|
|
86
|
+
info: string | null;
|
|
87
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLElement } from 'node-html-parser';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export declare const getCinemaColorRating: (el: HTMLElement) => CSFDColorRating;
|
|
2
|
+
import { CSFDCinemaGroupedFilmsByDate, CSFDCinemaMeta, CSFDCinemaMovie } from '../dto/cinema';
|
|
3
|
+
import { CSFDColorRating } from '../dto/global';
|
|
4
|
+
export declare const getCinemaColorRating: (el: HTMLElement | null) => CSFDColorRating;
|
|
5
5
|
export declare const getCinemaId: (el: HTMLElement | null) => number;
|
|
6
|
-
export declare const getCinemaUrlId: (url: string) => number | null;
|
|
6
|
+
export declare const getCinemaUrlId: (url: string | null | undefined) => number | null;
|
|
7
7
|
export declare const getCinemaCoords: (el: HTMLElement | null) => {
|
|
8
8
|
lat: number;
|
|
9
9
|
lng: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { HTMLElement } from 'node-html-parser';
|
|
2
|
-
import { CSFDCreatorScreening } from '../
|
|
3
|
-
export declare const getCreatorId: (url: string) => number;
|
|
4
|
-
export declare const getCreatorName: (el: HTMLElement | null) => string;
|
|
2
|
+
import { CSFDCreatorScreening } from '../dto/creator';
|
|
3
|
+
export declare const getCreatorId: (url: string | null | undefined) => number | null;
|
|
4
|
+
export declare const getCreatorName: (el: HTMLElement | null) => string | null;
|
|
5
5
|
export declare const getCreatorBirthdayInfo: (el: HTMLElement | null) => {
|
|
6
6
|
birthday: string;
|
|
7
7
|
age: number;
|
|
8
8
|
birthPlace: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const getCreatorBio: (el: HTMLElement | null) => string;
|
|
11
|
-
export declare const getCreatorPhoto: (el: HTMLElement | null) => string;
|
|
10
|
+
export declare const getCreatorBio: (el: HTMLElement | null) => string | null;
|
|
11
|
+
export declare const getCreatorPhoto: (el: HTMLElement | null) => string | null;
|
|
12
12
|
export declare const getCreatorFilms: (el: HTMLElement | null) => CSFDCreatorScreening[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CSFDColorRating } from '../
|
|
2
|
-
import { Colors } from '../
|
|
1
|
+
import { CSFDColorRating } from '../dto/global';
|
|
2
|
+
import { Colors } from '../dto/user-ratings';
|
|
3
3
|
export declare const parseIdFromUrl: (url: string) => number;
|
|
4
|
+
export declare const parseLastIdFromUrl: (url: string) => number;
|
|
4
5
|
export declare const getColor: (cls: string) => CSFDColorRating;
|
|
5
6
|
export declare const parseColor: (quality: Colors) => CSFDColorRating;
|
|
6
7
|
export declare const addProtocol: (url: string) => string;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { HTMLElement } from 'node-html-parser';
|
|
2
|
-
import { CSFDColorRating } from '../
|
|
3
|
-
import { CSFDBoxContent, CSFDCreatorGroups, CSFDGenres, CSFDMovieCreator, CSFDMovieListItem, CSFDPremiere, CSFDTitlesOther, CSFDVod } from '../
|
|
2
|
+
import { CSFDColorRating } from '../dto/global';
|
|
3
|
+
import { CSFDBoxContent, CSFDCreatorGroups, CSFDGenres, CSFDMovieCreator, CSFDMovieListItem, CSFDParent, CSFDPremiere, CSFDSeason, CSFDTitlesOther, CSFDVod } from '../dto/movie';
|
|
4
4
|
export declare const getMovieId: (el: HTMLElement) => number;
|
|
5
|
+
export declare const getSerieasAndSeasonTitle: (el: HTMLElement) => {
|
|
6
|
+
seriesName: string;
|
|
7
|
+
seasonName: string | null;
|
|
8
|
+
};
|
|
5
9
|
export declare const getMovieTitle: (el: HTMLElement) => string;
|
|
6
10
|
export declare const getMovieGenres: (el: HTMLElement) => CSFDGenres[];
|
|
7
11
|
export declare const getMovieOrigins: (el: HTMLElement) => string[];
|
|
@@ -15,6 +19,16 @@ export declare const getMoviePoster: (el: HTMLElement | null) => string;
|
|
|
15
19
|
export declare const getMovieRandomPhoto: (el: HTMLElement | null) => string;
|
|
16
20
|
export declare const getMovieTrivia: (el: HTMLElement | null) => string[];
|
|
17
21
|
export declare const getMovieDescriptions: (el: HTMLElement) => string[];
|
|
22
|
+
export declare const getSeasonsOrEpisodes: (el: HTMLElement, serie?: {
|
|
23
|
+
id: number;
|
|
24
|
+
title: string;
|
|
25
|
+
}) => CSFDSeason[] | null;
|
|
26
|
+
export declare const getEpisodeCode: (el: HTMLElement) => string | null;
|
|
27
|
+
export declare const detectSeasonOrEpisodeListType: (el: HTMLElement) => "seasons" | "episodes";
|
|
28
|
+
export declare const getSeasonorEpisodeParent: (el: HTMLElement, serie?: {
|
|
29
|
+
id: number;
|
|
30
|
+
name: string;
|
|
31
|
+
}) => CSFDParent | null;
|
|
18
32
|
export declare const getMovieGroup: (el: HTMLElement, group: CSFDCreatorGroups) => CSFDMovieCreator[];
|
|
19
33
|
export declare const getMovieType: (el: HTMLElement) => string;
|
|
20
34
|
export declare const getMovieVods: (el: HTMLElement | null) => CSFDVod[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement } from 'node-html-parser';
|
|
2
|
-
import { CSFDColorRating, CSFDFilmTypes } from '../
|
|
3
|
-
import { CSFDMovieCreator } from '../
|
|
2
|
+
import { CSFDColorRating, CSFDFilmTypes } from '../dto/global';
|
|
3
|
+
import { CSFDMovieCreator } from '../dto/movie';
|
|
4
4
|
export declare const getSearchType: (el: HTMLElement) => CSFDFilmTypes;
|
|
5
5
|
export declare const getSearchTitle: (el: HTMLElement) => string;
|
|
6
6
|
export declare const getSearchYear: (el: HTMLElement) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLElement } from 'node-html-parser';
|
|
2
|
-
import { CSFDColorRating, CSFDFilmTypes, CSFDStars } from '../
|
|
2
|
+
import { CSFDColorRating, CSFDFilmTypes, CSFDStars } from '../dto/global';
|
|
3
3
|
export declare const getUserRatingId: (el: HTMLElement) => number;
|
|
4
4
|
export declare const getUserRating: (el: HTMLElement) => CSFDStars;
|
|
5
5
|
export declare const getUserRatingType: (el: HTMLElement) => CSFDFilmTypes;
|
package/types/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { CSFDCinema, CSFDCinemaPeriod } from './
|
|
2
|
-
import { CSFDCreator } from './
|
|
3
|
-
import { CSFDMovie } from './
|
|
4
|
-
import { CSFDSearch } from './
|
|
5
|
-
import { CSFDUserRatingConfig, CSFDUserRatings } from './
|
|
6
|
-
import { CinemaScraper } from './services/cinema.service';
|
|
7
|
-
import { CreatorScraper } from './services/creator.service';
|
|
8
|
-
import { MovieScraper } from './services/movie.service';
|
|
9
|
-
import { SearchScraper } from './services/search.service';
|
|
10
|
-
import { UserRatingsScraper } from './services/user-ratings.service';
|
|
1
|
+
import { CSFDCinema, CSFDCinemaPeriod } from './dto/cinema';
|
|
2
|
+
import { CSFDCreator } from './dto/creator';
|
|
3
|
+
import { CSFDMovie } from './dto/movie';
|
|
4
|
+
import { CSFDSearch } from './dto/search';
|
|
5
|
+
import { CSFDUserRatingConfig, CSFDUserRatings } from './dto/user-ratings';
|
|
6
|
+
import { CinemaScraper } from './services/cinema.service.js';
|
|
7
|
+
import { CreatorScraper } from './services/creator.service.js';
|
|
8
|
+
import { MovieScraper } from './services/movie.service.js';
|
|
9
|
+
import { SearchScraper } from './services/search.service.js';
|
|
10
|
+
import { UserRatingsScraper } from './services/user-ratings.service.js';
|
|
11
11
|
export declare class Csfd {
|
|
12
12
|
private userRatingsService;
|
|
13
13
|
private movieService;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSFDCinema, CSFDCinemaPeriod } from '../
|
|
1
|
+
import { CSFDCinema, CSFDCinemaPeriod } from '../dto/cinema';
|
|
2
2
|
export declare class CinemaScraper {
|
|
3
3
|
private cinema;
|
|
4
4
|
cinemas(district?: number, period?: CSFDCinemaPeriod): Promise<CSFDCinema[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSFDUserRatingConfig, CSFDUserRatings } from '../
|
|
1
|
+
import { CSFDUserRatingConfig, CSFDUserRatings } from '../dto/user-ratings';
|
|
2
2
|
export declare class UserRatingsScraper {
|
|
3
3
|
private films;
|
|
4
4
|
userRatings(user: string | number, config?: CSFDUserRatingConfig): Promise<CSFDUserRatings[]>;
|
package/types/types.d.ts
ADDED
package/types/vars.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSFDCinemaPeriod } from './
|
|
1
|
+
import { CSFDCinemaPeriod } from './dto/cinema';
|
|
2
2
|
export declare const userRatingsUrl: (user: string | number, page?: number) => string;
|
|
3
3
|
export declare const movieUrl: (movie: number) => string;
|
|
4
4
|
export declare const creatorUrl: (creator: number | string) => string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|