node-csfd-api 1.9.0 → 1.10.2

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 CHANGED
@@ -66,7 +66,7 @@ csfd.movie(535121).then((movie) => console.log(movie));
66
66
  { country: 'Austrálie', title: 'Dragged Across Concrete' },
67
67
  { country: 'Velká Británie', title: 'Dragged Across Concrete' }
68
68
  ],
69
- poster: '//img.csfd.cz/files/images/film/posters/163/579/163579352_bf8737.jpg?h180',
69
+ poster: '//image.pmgstatic.com/cache/resized/w1080/files/images/film/posters/163/579/163579352_bf8737.jpg',
70
70
  creators: {
71
71
  directors: [
72
72
  {
@@ -91,12 +91,18 @@ const getPoster = (el) => {
91
91
  var _a;
92
92
  const poster = el.querySelector('.film-posters img');
93
93
  // Resolve empty image
94
- if ((_a = poster.classNames) === null || _a === void 0 ? void 0 : _a.includes('empty-image')) {
95
- return null;
94
+ if (poster) {
95
+ if ((_a = poster.classNames) === null || _a === void 0 ? void 0 : _a.includes('empty-image')) {
96
+ return null;
97
+ }
98
+ else {
99
+ // Full sized image (not thumb)
100
+ const imageThumb = poster.attributes.src.split('?')[0];
101
+ return imageThumb.replace(/\/w140\//, '/w1080/');
102
+ }
96
103
  }
97
104
  else {
98
- // Full sized image (not thumb)
99
- return poster.attributes.src.split('?')[0];
105
+ return null;
100
106
  }
101
107
  };
102
108
  exports.getPoster = getPoster;
@@ -16,7 +16,7 @@ export interface CSFDMovie extends CSFDScreening {
16
16
  similar: CSFDMovieListItem[];
17
17
  }
18
18
  export interface CSFDVod {
19
- title: 'Netflix' | 'hbogo' | 'Primve Video' | 'Apple TV+' | 'ivysilani' | 'Aerovod' | 'o2tv' | 'Voyo' | 'FILMY ČESKY A ZADARMO' | 'VAPET' | 'VOREL FILM' | string;
19
+ title: 'Netflix' | 'hbogo' | 'Prime Video' | 'Apple TV+' | 'ivysilani' | 'Aerovod' | 'o2tv' | 'Voyo' | 'FILMY ČESKY A ZADARMO' | 'VAPET' | 'VOREL FILM' | string;
20
20
  url: string;
21
21
  }
22
22
  export interface CSFDCreators {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-csfd-api",
3
- "version": "1.9.0",
3
+ "version": "1.10.2",
4
4
  "description": "Simple NPM library for scraping CSFD",
5
5
  "main": "./index.js",
6
6
  "author": "BART! <bart@bartweb.cz>",
@@ -15,7 +15,7 @@
15
15
  "test": "jest",
16
16
  "publish:next": "yarn && yarn build && yarn test --coverage true && npm publish --folder dist --tag beta",
17
17
  "postversion": "git push && git push --follow-tags",
18
- "release:beta": "npm version prerelease -m \"chore(update): prelease %s β\"",
18
+ "release:beta": "npm version preminor --preid=beta -m \"chore(update): prelease %s β\"",
19
19
  "release:patch": "git checkout master && npm version patch -m \"chore(update): patch release %s 🐛\"",
20
20
  "release:minor": "git checkout master && npm version minor -m \"chore(update): release %s 🚀\"",
21
21
  "release:major": "git checkout master && npm version major -m \"chore(update): major release %s 💥\""