node-csfd-api
Advanced tools
Comparing version 2.5.0 to 2.6.0
{ | ||
"name": "node-csfd-api", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "ČSFD API in JavaScript. Amazing NPM library for scrapping csfd.cz :)", | ||
@@ -50,3 +50,3 @@ "main": "./index.js", | ||
"engines": { | ||
"node": ">= 12" | ||
"node": ">= 14" | ||
}, | ||
@@ -53,0 +53,0 @@ "license": "MIT", |
@@ -17,7 +17,9 @@ "use strict"; | ||
const usersNode = html.querySelectorAll('.main-users article'); | ||
return this.parseSearch(moviesNode, usersNode); | ||
const tvSeriesNode = html.querySelectorAll('.main-series article'); | ||
return this.parseSearch(moviesNode, usersNode, tvSeriesNode); | ||
} | ||
parseSearch(moviesNode, usersNode) { | ||
parseSearch(moviesNode, usersNode, tvSeriesNode) { | ||
const movies = []; | ||
const users = []; | ||
const tvSeries = []; | ||
moviesNode.map((m) => { | ||
@@ -52,6 +54,24 @@ const url = (0, search_helper_1.getUrl)(m); | ||
}); | ||
tvSeriesNode.map((m) => { | ||
const url = (0, search_helper_1.getUrl)(m); | ||
const user = { | ||
id: (0, global_helper_1.parseIdFromUrl)(url), | ||
title: (0, search_helper_1.getTitle)(m), | ||
year: (0, search_helper_1.getYear)(m), | ||
url: `https://www.csfd.cz${url}`, | ||
type: (0, search_helper_1.getType)(m), | ||
colorRating: (0, search_helper_1.getColorRating)(m), | ||
poster: (0, search_helper_1.getPoster)(m), | ||
origins: (0, search_helper_1.getOrigins)(m), | ||
creators: { | ||
directors: (0, search_helper_1.parsePeople)(m, 'directors'), | ||
actors: (0, search_helper_1.parsePeople)(m, 'actors') | ||
} | ||
}; | ||
tvSeries.push(user); | ||
}); | ||
const search = { | ||
movies: movies, | ||
users: users, | ||
tvSeries: [], | ||
tvSeries: tvSeries, | ||
creators: [] | ||
@@ -58,0 +78,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63128
1153