Python click button with requests
<p>I have been trying to 'click' a button on a site with the requests module on a website, but I can't get it working.</p>

<p>This is the button on the site:</p>

<pre><code>&lt;div data-expected-currency="1" data-asset-type="T-Shirt" class="btn-primary btn-medium PurchaseButton " data-se="item-buyforrobux" data-item-name="T-Shirt" data-item-id="307054354" data-expected-price="2" data-product-id="28239339" data-expected-seller-id="96294876" data-bc-requirement="0" data-seller-name="All Player Clothing"&gt;
                                         Buy with R$
                                    &lt;/div&gt;
</code></pre>

<p>This is what I've been trying to do in  Python:</p>

<pre><code>urlattempt = 'https://www.roblox.com/NewLogin'
    values = {'Username': 'USER',
      'Password': 'PASSWORD',
              'action': 'login'}
    rpost = requests.post(urlattempt, data=values)
    cookies = rpost.cookies
    values2 = {'action': 'btn-primary btn-medium PurchaseButton'}
    rpost2 = requests.post('https://www.roblox.com/item.aspx?id='+price2, cookies=cookies, data=values2)
</code></pre>

<p>The login part works fine, it's just the last part (from values2) that doesn't works.</p>