bartholomej / node-csfd-api

ČSFD API in JavaScript. Amazing NPM library for scrapping csfd.cz :)
25 stars 2 forks source link

Duration is NaN on some movies #11

Closed silverqx closed 2 years ago

silverqx commented 2 years ago

Eg. Lord of the rings movies have special Length, they have three types of length, normal, directors cut, and special edition. In this case, the duration is NaN.

λ node .\index.js csfd-get 4711 -r
{
  id: 4711,
  title: 'Pán prstenů: Společenstvo Prstenu',
  year: 2001,
  duration: NaN,
  descriptions: [
bartholomej commented 2 years ago

Hi @silverqx, I've improved the movie length detection. Check if it works for you. The tests run specifically against the movie you posted (Lord of the Rings), but please try it with more movies and TV shows.

You can use the next version

npm install node-csfd-api@next

Make sure you have version 2.1.0-next.1 (or later) installed.

Let me know ;)

silverqx commented 2 years ago

Thx, I test and let know. 👌

silverqx commented 2 years ago

I have tested it on a few movies and it looks good.