title: How do I create a scrapy TextResponse object from html?
body: <p>I'm sending a POST request to an API using <code>scrapy.FormRequest</code> and receiving a <code>TextResponse</code> object back. The body of this object looks like so:</p>
  <pre><code>{
  &quot;Refiners&quot;: ...
  &quot;Results&quot;: ...
  }
  </code></pre>
  <p>I am only interested in the <code>Results</code> portion of the response as it contains HTML that I would like to parse.</p>
  <p>As such, I am trying to creating a new <code>TextResponse</code> object containing only the <code>Results</code> portion in the body, so that I am able to use the <code>response.css</code> method on it.</p>
  <p>I tried the following and it yielded an empty response body. Any thoughts on why and how to fix this?</p>
  <pre><code>new_response = scrapy.http.TextResponse(response.json()[&quot;Results&quot;])
  </code></pre>