Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

364
Views
¿Cómo puedo obtener el título de un video de YouTube usando javascript sin API de YouTube?

Estoy haciendo una extensión de Chrome y necesito obtener el título de los videos de YouTube. No quiero usar la api de youtube.

Aquí está el código en mi script de contenido

about 4 years ago · Santiago Gelvez
3 answers
Answer question

0

Lo resolvió haciendo var videotitle = document.title.split(" - YouTube")[0];

about 4 years ago · Santiago Gelvez Report

0

Puede tomar el título de la pestaña en background.js, devolverá el título del video de YouTube

 chrome.tabs.onActivated.addListener(function (activeInfo) { chrome.tabs.get(activeInfo.tabId, function (tab) { console.log("Title: " + tab.title); });

});

about 4 years ago · Santiago Gelvez Report

0

También puede usar esta línea de código en las herramientas de desarrollo F12:

ytInitialPlayerResponse.videoDetails.title

La misma línea de código también debería funcionar en su extensión.

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!