youtube-transcript-api icon indicating copy to clipboard operation
youtube-transcript-api copied to clipboard

Adding the title of the video in the metadata

Open santaCruz1854789 opened this issue 1 year ago • 10 comments

This request comes from the necessity to orderly save the transcribed file with a relevant and recognizable name. This addition should contribute to the API involvement in complex apps where you could for instance transcribe and save a batch of videos in an orderly manner.

I would like to have the metadata of the transcription include the title of the video as well.

The alternative is to fetch a YouTube Data API Key through Google Developers Console and use a different dedicated module to request it, which seems a bit and pardon my wording: "overkill."

In my case I'm trying to efficiently save and label video transcriptions file by minimizing the amount of time I have to manually interact with the code. In my case for every video I have to manually change the file name with the title of the video.

Thank you for reading my request.

santaCruz1854789 avatar Jul 25 '24 13:07 santaCruz1854789

I am looking for this feature too, great to see someone came it up

D1Vincenzo avatar Aug 01 '24 07:08 D1Vincenzo

yes this is needed

abhranil26 avatar Aug 16 '24 14:08 abhranil26

I concur - and at the occasion thank you authors for this very useful API. @santaCruz1854789 rather than taking the pain of going through the Google API, you can use beautifulsoup:

    soup = BeautifulSoup(r.content, "html.parser")
    link = soup.find_all(name="title")[0]
    video_title = link.text

arnobeutch avatar Mar 25 '25 10:03 arnobeutch

Hi all!

Just a quick update on this: with the introduction of v1.0.0 I've refactored some things under the hood, which will allow me to access metadata like the video's title more easily. I will try to create a new release soon which will make this information accessible through the Transcript and FetchedTranscript objects!

jdepoix avatar Mar 25 '25 11:03 jdepoix

That'd be excellent, @jdepoix.

arnobeutch avatar Mar 25 '25 12:03 arnobeutch

It would be ideal to include other things as well, if possible, such as:

  • shortDescription
  • thumbnails
  • title
  • Other JSON attributes from metadata?

antoniobologna avatar May 06 '25 05:05 antoniobologna

Would love see title as metadata. let us know

kaustubh-darekar avatar Jun 16 '25 12:06 kaustubh-darekar

Any updates on this? 👀

mohamedelhosseiny avatar Jul 05 '25 10:07 mohamedelhosseiny

@mohamedelhosseiny No updates here unfortunately. Maintaining has been taking up a lot of time recently, so I have been struggling to find time to add new features!

jdepoix avatar Jul 07 '25 11:07 jdepoix

@jdepoix no worries bro, btw the package is awesome! 🚀

mohamedelhosseiny avatar Jul 09 '25 21:07 mohamedelhosseiny