title: Find specific table using BeautifulSoup with specific caption
body: <p>I am attempting to locate the specific table below in the given HTML:</p>
  
  <pre><code>&lt;table class="sidearm-table collapse-on-medium accordion" accordion-table="" sortable-table=""&gt;
                          &lt;caption&gt;Tennessee Tech&lt;span class="hide"&gt; - Pitching Stats&lt;/span&gt;&lt;/caption&gt;
  </code></pre>
  
  <p>My approach was to find the caption, then proceed to find the parent table, from which I will iterate through the rows to find my desired text (I can accomplish this part on my own). I believe my error is buried in the fact that the caption text continues into the span tag, however not sure if this is the case. My code to do so is given below, however it continues to return None because it cannot locate the table (something with my syntax is likely incorrect):</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import re
  import requests
  
  header = {'User-agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5'}
  
  redirect = requests.get('http://goblueraiders.com/boxscore.aspx?path=baseball&amp;id=6117', headers = header).text
  soup = BeautifulSoup(redirect, 'html.parser')
  
  test = soup.find('caption', text = 'Tennessee Tech').find_parent('table', {'class': 'sidearm-table collapse-on-medium accordion'})
  </code></pre>