Using Python to request draftkings.com info that requires login?
<p>I'm trying to get contest data from the url: "<a href="https://www.draftkings.com/contest/gamecenter/32947401" rel="nofollow noreferrer">https://www.draftkings.com/contest/gamecenter/32947401</a>"  </p>

<p>If you go to this URL and aren't logged in, it'll just re-direct you to the lobby.  If you're logged in, it'll actually show you the contest results.</p>

<p><strong>Here's some things I tried:</strong></p>

<p>-First, I used Chrome's Dev networking tools to watch requests while I manually logged in</p>

<p>-I then tried copying the cookie that I thought contained the authentication info, it was of the form: </p>

<pre><code> 'ajs_anonymous_id=%123123123123123, mlc=true; optimizelyEndUserId'
</code></pre>

<p>-I then stored that cookie as an Evironment variable and ran this code:</p>

<pre><code>HEADERS= {'cookie': os.environ['MY_COOKIE'] }
requests.get(draft_kings_url, headers= HEADERS)
</code></pre>

<p>No luck, this just gave me the lobby.</p>

<p>I then tried request's built in:</p>

<ul>
<li>HTTPBasicAuth</li>
<li>HTTPDigestAuth</li>
</ul>

<p>No luck here either.</p>

<p>I'm no python expert by far, and I've pretty much exhausted what I know and the search results I've found.  Any ideas?</p>