title: Python beautifulsoup - getting input value
body: <p>I've got many table rows like this:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;100&lt;/td&gt;
      &lt;td&gt;200&lt;/td&gt;
      &lt;td&gt;&lt;input type="radio" value="123599"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Iterate with:</p>
  
  <pre><code>table = BeautifulSoup(response).find(id="sometable") # Make soup.
  
  for row in table.find_all("tr")[1:]: # Find rows.
      cells = row.find_all("td") # Find cells.
  
      points = int(cells[0].get_text())
      gold = int(cells[1].get_text())
      id = cells[2].input['value']
  
      print id
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>File "./script.py", line XX, in &lt;module&gt;
  id = cells[2].input['value']
  TypeError: 'NoneType' object has no attribute '__getitem__'
  </code></pre>
  
  <p>How can I get input value? I don't want to use regexp.</p>