Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

305
Visualizações
Is there a way to remove quotation marks (Node.js Web Application)

Code:

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)

}

Output :

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

URL

So its there a way to remove the quotation marks from the output URL??

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

To get a copy of a string str without its first and last character :

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

So :

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

0

You may use .replace()

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

So in your case

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 Relatório

0

You can try use .replace function like this :

const string = `i am' abc `;

console.log(string.replace("'", ''))

console : i am abc

you can read more about is here

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda