How to create variable from HTML response body?

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question: How do I create a variable from a response body that is returned in HTML?

Details (like screenshots):

How I found the problem: I am trying to define this as a variable to call upon later on.

I’ve already tried: I have tried to convert the html to JSON, but nothing I have found has worked so far.

Can you post the HTML response?

What does it look like if you convert it to JSON or XML?

Fellowship One API

Fellowship One

<hr />
<form action="/v1/PortalUser/SignIn" method="post">
<p>
    In order to authorize this application to access your data, please enter your login info below. Thanks!

</p>
<p class="error">
    
</p>

<p>
    <label for="username">
        Username
	
    </label>
    <br />
    <input id="username" name="username" type="text" value="" />
</p>
<p>
    <label for="password">
        Password
	
    </label>
    <br />
    <input id="password" name="password" type="password" />
</p>
<p>
    <input type="submit" value="Login" />
</p>
</form>
<hr />
<script type="text/javascript">
    /* <[!CDATA[ */
    document.getElementById('username').focus();
    /* ]]> */
</script>

    <p id="api_footer">
	    &copy; Fellowship Technologies. All rights reserved.
    </p> 
</div>

That looks like your request, not the response.

I suspect you should be able to parse the HTML using Cheerio.

Scroll down to the bit where it say’s “If you really wish to parse HTML”.