title: Scraping with Python and ViewState
body: <p>Until just a couple of weeks ago i was able to get the json data from a website after performing some post requests</p>
  <pre><code>payload = {'NumDossier': numCase_com, 'idJuridiction': numJuri, 'typeDossier': &quot;DP&quot;}
  r = requests.post(url, json=payload)
  </code></pre>
  <p>Now i am getting this strange HTML on every post request</p>
  <pre><code>&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;body&gt;
      &lt;form method=&quot;post&quot; action=&quot;./getJuridiction1instance&quot; id=&quot;form1&quot;&gt;
          &lt;input type=&quot;hidden&quot; name=&quot;__VIEWSTATE&quot; id=&quot;__VIEWSTATE&quot; value=&quot;/wEPDwULLTE2MTY2ODcyMjlkZDDGgir+XqoIRtkvd//GurKfYTbq8hIisZRyOefPLUDj&quot; /&gt;
          &lt;input type=&quot;hidden&quot; name=&quot;__VIEWSTATEGENERATOR&quot; id=&quot;__VIEWSTATEGENERATOR&quot; value=&quot;79390B9D&quot; /&gt;
          &lt;div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>When inspecting the newtwork on chrome, in no time it sends <code>__VIEWSTATE or __VIEWSTATEGENERATOR</code>, i spent two days trying to figure out what i am doing wrong but nothing. (I am no expert in ASP.Net)</p>
  <p>PS: I get the same result with postman</p>