title: Use python requests to submit search forms
body: <p>I need to use requests to <strong>scrape</strong> some data from a website. The website is like <code>https://www.example.com/tele/search.php</code>. The website has a section like following:</p>
  <pre><code>&lt;form action=&quot;search-result.php&quot; method=&quot;post&quot; name=&quot;sub&quot;&gt;
      &lt;label class=&quot;sr-only&quot; for=&quot;usrname&quot;&gt;Username&lt;/label&gt;
      &lt;div class=&quot;input-group mb-3&quot;&gt;
          &lt;div class=&quot;input-group-prepend&quot;&gt;...&lt;/div&gt;
          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; name=&quot;cnnum&quot; placeholder=&quot;322112222 or 3520211114489&quot; aria-label=&quot;Username&quot; aria-describedby=&quot;basic-addon1&quot;&gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;button type=&quot;submit&quot; class=&quot;btn btn-danger center-block&quot; style=&quot;align-center &quot;&gt;Search&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>So what I did was:</p>
  <pre><code>import requests
  from bs4 import BeautifulSoup
  S_URL = 'https://example.com/tele/search-result.php'
  cnnum = '**********'
  login_information = {
      'cnnum': cnnum
  }
  
  response = requests.post(S_URL, data=login_information)
  print(response.content)
  </code></pre>
  <p>But it is not working and showing a not acceptable error. I am new to requests so kindly help. I do not want to use selenium. I want to do this with requests.</p>