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

304
Views
¿Hay alguna forma de eliminar las comillas (aplicación web Node.js)?

Código:

 async function watchAnime(episode_id) { res = await axios.get(`https://www1.gogoanime.cm/${episode_id}`) const body = await res.data; $ = cheerio.load(body) src=$('div.play-video > iframe').attr('src') iframe_result = src return await (iframe_result) }

Producción :

 "//gogoplay1.com/streaming.php?id=MTU1MzEy&title=B%3A+The+Beginning+Succession+%28Dub%29+Episode+6"

URL

Entonces, ¿hay alguna manera de eliminar las comillas de la URL de salida?

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Para obtener una copia de una cadena str sin su primer y último carácter:

 const newString = str.substring(1, str.length-1)

Asi que :

 const str = `"foo"` console.log(str.substring(1, str.length-1)) // output foo
about 4 years ago · Santiago Trujillo Report

0

Puede usar .replace()

 src.replace(/['"]+/g, '')

Entonces en tu caso

 async function watchAnime(episode_id) { res = await axios.get(`https://www1.gogoanime.cm/${episode_id}`) const body = await res.data; $ = cheerio.load(body) let src = $('div.play-video > iframe').attr('src') let iframe_result = src.replace(/['"]+/g, '') return await (iframe_result) }
about 4 years ago · Santiago Trujillo Report

0

Puede intentar usar la función .replace como esta:

 const string = `i am' abc `; console.log(string.replace("'", ''))

consola: soy abc

puedes leer más sobre es aquí

about 4 years ago · Santiago Trujillo 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!