TimeForANinja / node-ytsr

Do anonymous YouTube search requests.
MIT License
285 stars 66 forks source link

Not returning correct duration #163

Closed Hydro001 closed 2 years ago

Hydro001 commented 2 years ago

Hi, using this code and the latest version of Node.js and node-ytsr (3.8.0) :

ytsr('Top 20 Most Popular Songs by NCS | Best of NCS | Most Viewed Songs', { limit: 1 }).then(response => {
    console.log(response);
});

Gives me this output :

{
  originalQuery: 'Top 20 Most Popular Songs by NCS | Best of NCS | Most Viewed Songs', 
  correctedQuery: 'Top 20 Most Popular Songs by NCS | Best of NCS | Most Viewed Songs',
  results: 412579951,
  activeFilters: [
    {
      name: 'Relevance',
      active: true,
      url: null,
      description: 'Sort by relevance'
    }
  ],
  refinements: [],
  items: [
    {
      type: 'video',
      title: 'Top 20 Most Popular Songs by NCS | Best of NCS | Most Viewed Songs',     
      id: '-ObdvMkCKws',
      url: 'https://www.youtube.com/watch?v=-ObdvMkCKws',
      bestThumbnail: [Object],
      thumbnails: [Array],
      isUpcoming: false,
      upcoming: null,
      isLive: false,
      badges: [],
      author: [Object],
      description: null,
      views: 30356729,
      duration: '15:06',
      uploadedAt: '2 years ago'
    }
  ],
  continuation: null
}

The problem is that ytsr reports that the duration is '15:06' while Youtube says that it's '01:12:46'

Thanks for reading and have a nice day 👍

TimeForANinja commented 2 years ago

ok that's interesting... not sure what to do though, looks like youtube screwed up 😂 ... the website reports the same 15:06 image

Hydro001 commented 2 years ago

Yeah, i don't know what to do either honestly, even when clicking the 15:06 minutes video it goes to the 01:12:46 one, it seems to be a problem with the Youtube website itself, not sure that you can do anything to fix it 😂

Hydro001 commented 2 years ago

I'm closing cause it's a Youtube problem, nothing to do with ytsr at all, sorry for disturbing have a nice day :)