title: Is it possible to get a g-Recaptcha-Response value with python requests?
body: <p>I'm trying to log into this website <a href="https://www.santillanaconnect.com/Account/Login/?wtrealm=http%3A%2F%2Flms30.santillanacompartir.com%2Flogin%2Fcompartir%2F&amp;wreply=https%3A%2F%2Flms30.santillanacompartir.com%2Flogin%2Fsso%2Floginconnect" rel="nofollow noreferrer">santillanaconnect.com</a> with python requests, the problem is that I need to get the value of <code>g-Recaptcha-Response</code> to be able to log in (among some other things but those are not a problem). If I inspect element and search for <code>g-Recaptcha-Response</code> then I'll get:</p>
  <p><code>&lt;input type=&quot;hidden&quot; id=&quot;g-Recaptcha-Response&quot; name=&quot;g-Recaptcha-Response&quot; value=&quot;long string&quot;&gt;</code></p>
  <p>I tried to make a <code>get</code> request to save the value in some variable, so that I could then make a <code>post</code> request with that token. The problem is that when I try to get the value of <code>g-Recaptcha-Response</code> from the html of the response the value doesn't show up, I already tried adding headers (because maybe it won't show up because python requests User-Agent is blacklisted / not common) but it still doesn't work</p>
  <pre><code>import requests
  
  url = &quot;https://www.santillanaconnect.com/Account/Login/?wtrealm=http%3A%2F%2Flms30.santillanacompartir.com%2Flogin%2Fcompartir%2F&amp;wreply=https%3A%2F%2Flms30.santillanacompartir.com%2Flogin%2Fsso%2Floginconnect&quot;
  
  headers = {
      &quot;Accept&quot;: &quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9&quot;,
      &quot;Accept-Encoding&quot;: &quot;gzip, deflate, br&quot;, 
      &quot;Accept-Language&quot;: &quot;es-ES,es;q=0.9&quot;, 
      &quot;Dnt&quot;: &quot;1&quot;,
      &quot;Upgrade-Insecure-Requests&quot;: &quot;1&quot;, 
      &quot;User-Agent&quot;:&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.57&quot;
  }
  
  with requests.Session() as s:
       
      r = s.get(url, headers=headers)
      print (r.text)
  </code></pre>