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

222
Views
obtener el título asíncrono de YouTube de la biblioteca npm get-youtube-title

Necesito obtener un título de un video de YouTube. ¿Cómo puedo cambiar una solicitud de esta biblioteca para que sea asíncrona? En realidad esto devuelve undefined

esta es una aplicación vue.js

 async addNewVideoToLocalStorage() { let id = getIdFromURL(this.videosUrl[0].url); let title = await getYoutubeTitle(id, async (e, t) => await t); }

https://www.npmjs.com/package/get-youtube-title

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

data: () => ({ title: "", })
 async get_title() { var getYoutubeTitle = require('get-youtube-title'); let id = 'QR1jRM4XTyc'; await getYoutubeTitle(id, (e, t) => { return this.title = t }) console.log(this.title); }

async, await no puede funcionar en getYoutubeTitle 🥺

prueba de esta manera

about 4 years ago · Juan Pablo Isaza 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!