title: Python Beautiful Soup Table Data Scraping Specific TD Tags
body: <p>This webpage has multiple tables on it: <a href="http://www.nfl.com/player/tombrady/2504211/gamelogs" rel="nofollow">http://www.nfl.com/player/tombrady/2504211/gamelogs</a>  . </p>
  
  <p>Within the HTML all of the tables are labeled the exact same:</p>
  
  <pre><code>&lt;table class="data-table1" width="100%" border="0" summary="Game Logs For Tom Brady In 2014"&gt;
  </code></pre>
  
  <p>I can scrape data from only the first table (Preseason table) but I do not know how to skip the first table (Preseason) and scrape data from the second and third tables (Regular Season and Post Season).</p>
  
  <p>I'm trying to scrape specific numbers.</p>
  
  <p>My code:</p>
  
  <pre><code>import pickle
  import math
  import urllib2
  from lxml import etree
  from bs4 import BeautifulSoup
  from urllib import urlopen
  
  year = '2014'
  lastWeek = '2'
  favQB1 = "Tom Brady"
  
  favQBurl2 = 'http://www.nfl.com/player/tombrady/2504211/gamelogs'
  favQBhtml2 = urlopen(favQBurl2).read()
  favQBsoup2 = BeautifulSoup(favQBhtml2)
  favQBpass2 = favQBsoup2.find("table", { "summary" : "Game Logs For %s In %s" % (favQB1, year)})
  favQBrows2 = []
  
  for row in favQBpass2.findAll("tr"):
      if lastWeek in row.findNext('td'):  
          for item in row.findAll("td"):
              favQBrows2.append(item.text)
  print ("Enter: Starting Quarterback QB Rating of Favored Team for the last game played (regular season): "),
  print favQBrows2[15]
  </code></pre>