node-csfd-api
Advanced tools
Comparing version 1.3.0-beta.2 to 1.3.0
{ | ||
"name": "node-csfd-api", | ||
"version": "1.3.0-beta.2", | ||
"version": "1.3.0", | ||
"description": "Simple NPM library for scraping CSFD", | ||
@@ -25,3 +25,3 @@ "main": "./index.js", | ||
"cross-fetch": "^3.0.6", | ||
"node-html-parser": "^2.0.2" | ||
"node-html-parser": "^2.1.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "repository": { |
@@ -113,4 +113,6 @@ [![npm version](https://badge.fury.io/js/node-csfd-api.svg)](https://badge.fury.io/js/node-csfd-api) | ||
Get all of [my ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/) | ||
### Last ratings (last page) | ||
Get [my last 50 ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/) | ||
```javascript | ||
@@ -122,5 +124,22 @@ import { csfd } from 'node-csfd-api'; | ||
#### Results | ||
### All ratings (all pages) | ||
> Warning: Use it wisely. Can be detected and banned. Consider using it together with `allPagesDelay` attribute. | ||
Get [all of my ratings](https://www.csfd.cz/uzivatel/912-bart/hodnoceni/) | ||
```javascript | ||
import { csfd } from 'node-csfd-api'; | ||
csfd | ||
.userRatings('912-bart', { | ||
allPages: true, // Download all pages (one by one) | ||
allPageDelay: 2000 // Make delay 2000ms on each page request | ||
}) | ||
.then((ratings) => console.log(ratings)); | ||
``` | ||
### Results | ||
```javascript | ||
[ | ||
@@ -150,6 +169,8 @@ { | ||
| Option | Type | Default | Description | | ||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------- | --------------------------------------------------------- | | ||
| **includesOnly** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Including only film types. eg. `['TV Seriál', 'koncert']` | | ||
| **exclude** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Excluding film types eg. `['epizoda', 'série']` | | ||
| Option | Type | Default | Description | | ||
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------- | --------------------------------------------------------- | | ||
| **includesOnly** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Including only film types. eg. `['TV Seriál', 'koncert']` | | ||
| **exclude** | [CSFDFilmTypes[]](https://github.com/bartholomej/node-csfd-api/blob/8fa5f9cbc7e7f2b62b0bd2c2b5a24c9a63444f6a/src/interfaces/global.ts#L25) | null | Excluding film types eg. `['epizoda', 'série']` | | ||
| **allPages** | boolean | false | Get all pages | | ||
| **allPagesDelay** | number | 0 | Delay on each page request. In milliseconds | | ||
@@ -168,5 +189,7 @@ _Note: You can not use both parameters 'includesOnly' and 'excludes'. Parameter 'includesOnly' has a priority._ | ||
- [ ] Creators | ||
- [ ] User Ratings | ||
- [ ] Bio | ||
- [ ] Movies | ||
- [x] User Ratings | ||
- [x] Last ratings | ||
- [ ] All pages ([branch](https://github.com/bartholomej/node-csfd-api/tree/user-rating-all)) | ||
- [x] All pages | ||
@@ -173,0 +196,0 @@ ## Development |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
33895
0
250
Updatednode-html-parser@^2.1.0