Postman: how to extract the text from html responce [on hold]












0















Tell me please, how i can extract value of "click" from html responce below



<!doctype html><html lang="en"><head><title>Redirecting...</title></head><body><script>
document.location.href = 'https://play.google.com/store/apps/details?id=air.com.littlebigplay.games.premium.plurals&click=12ac47495691e968eebf549f77b760d6&mysuffix={HELLO_WORLD}&optid=12ac47495691e968eebf549f77b760d6';
</script></body></html>


i used such code:



const $ = cheerio.load(pm.response.text())

pm.test("it should return a title", () => {
pm.expect($('script').text()).to.include("^click&")
})

pm.environment.set('{transaction_id}', $('script').text())


but it extract all text from tag script. I suggest i must use the regex, but i don't know where i can include it










share|improve this question















put on hold as off-topic by Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT 2 days ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT

If this question can be reworded to fit the rules in the help center, please edit the question.





















    0















    Tell me please, how i can extract value of "click" from html responce below



    <!doctype html><html lang="en"><head><title>Redirecting...</title></head><body><script>
    document.location.href = 'https://play.google.com/store/apps/details?id=air.com.littlebigplay.games.premium.plurals&click=12ac47495691e968eebf549f77b760d6&mysuffix={HELLO_WORLD}&optid=12ac47495691e968eebf549f77b760d6';
    </script></body></html>


    i used such code:



    const $ = cheerio.load(pm.response.text())

    pm.test("it should return a title", () => {
    pm.expect($('script').text()).to.include("^click&")
    })

    pm.environment.set('{transaction_id}', $('script').text())


    but it extract all text from tag script. I suggest i must use the regex, but i don't know where i can include it










    share|improve this question















    put on hold as off-topic by Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT 2 days ago


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "This question is not about computer hardware or software, within the scope defined in the help center." – Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT

    If this question can be reworded to fit the rules in the help center, please edit the question.



















      0












      0








      0








      Tell me please, how i can extract value of "click" from html responce below



      <!doctype html><html lang="en"><head><title>Redirecting...</title></head><body><script>
      document.location.href = 'https://play.google.com/store/apps/details?id=air.com.littlebigplay.games.premium.plurals&click=12ac47495691e968eebf549f77b760d6&mysuffix={HELLO_WORLD}&optid=12ac47495691e968eebf549f77b760d6';
      </script></body></html>


      i used such code:



      const $ = cheerio.load(pm.response.text())

      pm.test("it should return a title", () => {
      pm.expect($('script').text()).to.include("^click&")
      })

      pm.environment.set('{transaction_id}', $('script').text())


      but it extract all text from tag script. I suggest i must use the regex, but i don't know where i can include it










      share|improve this question
















      Tell me please, how i can extract value of "click" from html responce below



      <!doctype html><html lang="en"><head><title>Redirecting...</title></head><body><script>
      document.location.href = 'https://play.google.com/store/apps/details?id=air.com.littlebigplay.games.premium.plurals&click=12ac47495691e968eebf549f77b760d6&mysuffix={HELLO_WORLD}&optid=12ac47495691e968eebf549f77b760d6';
      </script></body></html>


      i used such code:



      const $ = cheerio.load(pm.response.text())

      pm.test("it should return a title", () => {
      pm.expect($('script').text()).to.include("^click&")
      })

      pm.environment.set('{transaction_id}', $('script').text())


      but it extract all text from tag script. I suggest i must use the regex, but i don't know where i can include it







      postman






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 18 at 9:48









      Romeo Ninov

      1,79721014




      1,79721014










      asked Jan 18 at 9:25









      user986788user986788

      11




      11




      put on hold as off-topic by Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT 2 days ago


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This question is not about computer hardware or software, within the scope defined in the help center." – Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT

      If this question can be reworded to fit the rules in the help center, please edit the question.







      put on hold as off-topic by Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT 2 days ago


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "This question is not about computer hardware or software, within the scope defined in the help center." – Twisty Impersonator, music2myear, DrMoishe Pippik, Mike Fitzpatrick, Pimp Juice IT

      If this question can be reworded to fit the rules in the help center, please edit the question.






















          0






          active

          oldest

          votes

















          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          How do I know what Microsoft account the skydrive app is syncing to?

          When does type information flow backwards in C++?

          Grease: Live!