0

Requirements:

  1. Plain Javascript, only.
  2. NO Google API account.
  3. Code that works today.

I'm struggling for hours searching answers here and elsewhere to no avail. The answers are either too old (BTW, no way to filter them for a date!?!) and thus not working, or they are written in PHP, Jquery, Bash, etc.

I find it extremely ironical to being able to embed a video based on an ID easily, play the video, control it, but no way to get its title using Javascript!?!?

The reason I need the title to be acquired automatically is to increase the efficiency in filling a database built with HTML and Javascript.

Can anyone help?

dllb
  • 59
  • 1
  • 7

1 Answers1

0

You can call: http://youtube.com/get_video_info?video_id=XXXXXXXX This call will return text that needs to be parsed. This response contains all info about the video including the title.

Gabriel Lupu
  • 1,397
  • 1
  • 13
  • 29
  • Thanks, but I tried the code from the last answer here https://stackoverflow.com/questions/906876/call-a-url-from-javascript to call the URL and got a cross-origin error. Video is allowed, info is not? – dllb Nov 16 '20 at 20:55