title: Python Beautiful Soup - Getting input value
body: <p>My plan is to be able to grab the _AntiCsrfToken by using Bs4. </p>
  
  <p>I have this HTML where my HTML comes from <a href="https://i.stack.imgur.com/o3w1Q.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o3w1Q.jpg" alt="enter image description here"></a></p>
  
  <p>and what I have written in the code is </p>
  
  <pre><code>token = soup.find('input', {'name':'_AntiCsrfToken'})['value'])
  print(token)
  </code></pre>
  
  <p>but it gives me a error saying </p>
  
  <pre><code>    Traceback (most recent call last):
    File "C:\Users\HelloWorld.py", line 67, in &lt;module&gt;
      print(soup.find('input', {'name':'_AntiCsrfToken'})['value'])
    File "C:\Python\lib\site-packages\bs4\element.py", line 1292, in find
      l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
  AttributeError: 'str' object has no attribute 'find_all'
  </code></pre>
  
  <p>I quite dont understand if I have done it right or not. I do think I did it right but maybe I need to find it before from form-id than just go into hidden directly ? </p>