title: Python BeautifulSoup scraping tables from a webpage
body: <p>I am trying to scrape data from a webpage that has a table of users that are currently signed into the site</p>
  
  <p>I'm using the below code to sign into the site</p>
  
  <pre><code>browser = RoboBrowser()
  loginURL = 'https://geico.aisreview.com/ais/admin.aspx'
  browser.open(loginURL)
  form = browser.get_form(id='form1')
  form['txtPWD'].value = 'myPassword'
  browser.submit_form(form)
  </code></pre>
  
  <p>And I'm using this code to try and pull the data from the table. Right now I'm just trying to print it for testing purposes</p>
  
  <pre><code>soup = BeautifulSoup(loginURL)
  table = soup.find_all("table", {"class": "rgMasterTable"})
  for myTable in table:
    table_body = myTable.find('tbody')
    try:
      rows = table_body.find_all('tr')
      for tr in rows:
        cols = tr.find_all('td')
        for td in cols:
          print td.text
    except:
      print "no tbody found"
  </code></pre>
  
  <p>When running the code I don't get any errors, but nothing prints out. I was able to determine that the for loop is never being entered but I can't figure out why.</p>