title: Python Requests Library - Scraping separate JSON and HTML responses from POST request
body: <p>I'm new to web scraping, programming, and StackOverflow, so I'll try to phrase things as clearly as I can.</p>
  <p>I'm using the Python requests library to try to scrape some info from a local movie theatre chain. When I look at the Chrome developer tools response/preview tabs in the network section, I can see what appears to be very clean and useful JSON:</p>
  <p>However, when I try to use requests to obtain this same info, instead I get the entire page content (pages upon pages of html). Upon further inspection of the cascade in the Chrome developer tools, I can see there are two events called GetNowPlayingByCity: One contains the JSON info while the other seems to be the HTML.</p>
  <p><a href="https://i.stack.imgur.com/cSZSD.png" rel="nofollow noreferrer">JSON Response</a>
  <a href="https://i.stack.imgur.com/JQPS8.png" rel="nofollow noreferrer">HTML Response</a></p>
  <p><strong>How can I separate the two and only obtain the JSON response using the Python requests library?</strong></p>
  <p>I have already tried modifying the headers within requests.post (the Chrome developer tools indicate this is a post method) to include <em>&quot;accept: application/json, text/plain, */*&quot;</em> but didn't see a difference in the response I was getting with requests.post. As it stands I can't parse any JSON from the response I get with requests.post and get the following error:</p>
  <p>&quot;json.decoder.JSONDecodeError: Expecting value: line 4 column 1 (char 3)&quot;</p>
  <p>I can always try to parse the full HTML, but it's so long and complex I would much rather work with friendly JSON info. Any help would be much appreciated!</p>