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

184
Views
¿Cómo encuentro la URL de un anuncio en YouTube en JavaScript?

Actualmente estoy creando una extensión para el navegador y la necesito para encontrar la URL de un anuncio que se reproduce en la pantalla en YouTube. ¿Cómo puedo hacer esto en JavaScript?

Encontré algo llamado 'adVideoId' en la etiqueta del cuerpo de una página que contiene un anuncio de video, que creo que es una variable de objeto de JavaScript, pero parece que no puedo extraer su valor.

Nota: el 'adVideoId' se encuentra al final del código a continuación.

 <body dir="ltr" standardized-themed-scrollbar=""><div id="watch7-content" class="watch-main-col" itemscope="" itemid="" itemtype="http://schema.org/VideoObject"><link itemprop="url" href="https://www.youtube.com/watch?v=l1YwPDTsLJ"><meta itemprop="name" content="I Went UNDERCOVER in a Tournament!"><meta itemprop="description" content="Undercover in a Raider Only! SUBSCRIBE &amp; CLICK THE BELL! 🔔Merch: https://..."><meta itemprop="videoId" n27r_zAhXjp1EKHZpXDrI="}},"hoverText":{"simpleText":"Why this ad?"},"trackingParams":"CDgQs-4CIhMIrdfp9u6_8wIV46dRCh2aVw6y"}},"adVideoId":"d40g6ewFE-k","impressionPings":[{"base
 var ytInitialPlayerResponse = {"responseContext":{"serviceTrackingParams [shortened here because it is ridiculously long] "adVideoId":"sEVvXIQ_DLY"
about 4 years ago · Juan Pablo Isaza
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!