title: Trouble identifying difference in BeautifulSoup commented tables
body: <p>I'm aware of some other questions regarding commented HTML tables from this site but I don't believe they answer this specific question.</p>
  <p>I am trying to scrape <a href="https://www.basketball-reference.com/players/j/jamesle01.html" rel="nofollow noreferrer">this page</a> for all the tables with in it.  I can get all but one of them, &quot;Shooting&quot;.</p>
  <p>I recognize that all but &quot;Per Game&quot; are commented out in the page source.  In order to handle commented out tables, I'm using code that looks like:</p>
  <pre><code>soup = BeautifulSoup(res.text, &quot;lxml&quot;)
  comment_table = soup.find(text=lambda x: isinstance(x, NavigableString) and stat in x)
  soup = BeautifulSoup(comment_table, &quot;lxml&quot;)
  table = soup.find(&quot;table&quot;, id=stat)
  </code></pre>
  <p><code>stat</code> can be any number of &quot;stats&quot;.  Ones that work are things like &quot;per_minute&quot;, &quot;pbp&quot;, &quot;adj_shooting&quot;, etc.</p>
  <p>It first finds the commented out tables and then proceeds to parse the table as normal from there.  With all the commented tables, <code>table</code> is a table Tag.  When <code>stat</code> is &quot;shooting&quot;, however, <code>table</code> is empty.</p>
  <p>When looking for instances containing &quot;shooting&quot;, the <code>comment_table</code> line is returning the text <code>'Player shooting history'</code> instead of the expected table.  I've verified that there is &quot;shooting&quot; in the commented out text (in the page source).</p>
  <p>Can someone help me figure out what's different about this table?</p>