distubejs / ytdl-core

YouTube video downloader in javascript.
MIT License
261 stars 48 forks source link

correct README logging title example #81

Closed CarsonBurke closed 3 days ago

CarsonBurke commented 2 months ago

it appears videoInfo was updated to move title into videoDetails without the readme being changed to reflect this.

I have tested this code on my machine using the latest version of @distube/ytdl-core with success; simply using info.title threw an error that the property does not exist on type videoInfo

test code:

  const url = "http://www.youtube.com/watch?v=aqz-KE-bpKQ";

  const basicVideoInfo = await ytdl.getBasicInfo(url)
  const videoTitle = basicVideoInfo.videoDetails.title

console.log("videoTitle", videoTitle) // Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film