# Getting a specific content in HTML response

**URL:** <https://community.postman.com/t/getting-a-specific-content-in-html-response/14734>\
**Category:** Help Hub\
**Tags:** tests, parsing-html\
**Created:** [August 5, 2020, 9:53am UTC](https://community.postman.com/t/getting-a-specific-content-in-html-response/14734 "2020-08-05T09:53:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![odanylewycz](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/odanylewycz/32/3240_2.png) [@odanylewycz](https://community.postman.com/u/odanylewycz)\
**Post date:** [August 5, 2020, 1:11pm UTC](https://community.postman.com/t/getting-a-specific-content-in-html-response/14734/3 "2020-08-05T13:11:00Z")

</div>

Hi @nguyenvietdungqsq

Welcome to the community! 👏

In addition you can use cheero.js to load the HTML, and parse your results.

```
const response = cheerio.load(pm.response.text(), {
    ignoreWhitespace: true,
    xmlMode: true
});

```

`const sessionId = response('script').find('sessionId')`

The above may not working exactly, as I am shooting from the hip, but you can use cheerio to parse through your html and get to your element and then parse out the js from there.

However, I will have to agree with @allenheltondev, and having a sessionID in the js script of a html page is not good practice, and a bit unsafe. That information is better sent in headers or a JWT. I am no professional with communicating session IDs with web pages, however, from my experience, seeing it in the script portion of an html page is uncommon for me.

Hope this helps!

---

_[View the full topic](https://community.postman.com/t/getting-a-specific-content-in-html-response/14734)._
