title: Click a button with python requests
body: <p>I want to make a bot, that clicks on a button on a web page. I have already done it with selenium, but it's very slow, and i need it to be fast. So i chose the requests library. I just wanted to ask: is there any way you can press a button with requests?
  Website: <a href="https://manomokykla.lrt.lt/mokyklos/" rel="nofollow noreferrer">https://manomokykla.lrt.lt/mokyklos/</a> (I am just testing on this website and not planning to bot it or anything) I just want to find out how to press the button, So i can use it in my future projects.</p>
  <p>here is the button on the website:</p>
  <p><a href="https://i.stack.imgur.com/fAUjx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fAUjx.png" alt="enter image description here" /></a></p>
  <p>the button's function:</p>
  <pre><code>function(event) 
  {
  
    var school = $(this).data('school-id');
    var ip = $('input[name=&quot;ip-address&quot;]').val();
    var current = $('div[data-mokyk-id=&quot;' + school + '&quot;] strong').text();
    var getCokies = Cookies.get('balsuok');
  
    Cookies.set('balsuok', '1', {
      expires: 30
    });
  
    if (getCokies !== undefined &amp;&amp; getCokies == '1') {
  
    } else {
      var formData = {
        'from': 'balsuok',
        'school': school,
        'ip': ip
      };
  
      $.ajax({
          type: 'POST',
          url: '/wp-content/themes/ism-lrt-promo/ajax/balsuok.php',
          data: formData,
          dataType: 'json',
          encode: true
        })
        // using the done promise callback
        .done(function(data) {
          if (data['success'] == true) {
            $('.popup-all-info-success').addClass('active');
            $('.popup-all-info').removeClass('active');
  
            setTimeout(function() {
              $('.open-counter').show();
              $('.action-line').removeClass('active');
              $('.action-line').remove();
  
              $('div[data-mokyk-id=&quot;' + school + '&quot;] strong').html(parseInt(current) + 1);
              $('div[data-mokyk-select=&quot;' + school + '&quot;] span').attr('data-number-length', parseInt(current) + 1);
  
              $('.line span').each(function(i, obj) {
                var currentNumber = $(this).data('number-length');
  
                var calculate = (currentNumber * 100) / getMaxNumber;
  
                $(this).css('width', calculate + '%');
              });
            }, 1000);
          }
        })
  
      .fail(function(data) {
        console.log(data);
      });
    }
  
    event.preventDefault();
  }
  </code></pre>
  <p>Params after Vote:
  <img src="https://i.stack.imgur.com/rpAMe.png" alt="2" />
  <img src="https://i.stack.imgur.com/Kxnyn.png" alt="3" /></p>