Missing class in beautifulsoup
<p>I am attempting to grab a div on the MTA info page. When I grab the html and parse it with BeautifulSoup it seems to be missing some data.</p>

<p>Here is my code so far</p>

<pre><code>from bs4 import BeautifulSoup
import urllib # access the web

# SUBWAY STATUS PROJECT
userURL = "http://www.mta.info" # MTA SITE

htmlfile = urllib.urlopen(userURL) #creates html file
htmldoc = htmlfile.read()   #creates html text

soup = BeautifulSoup(htmldoc, 'html.parser')    

subChart = soup.find( id = 'subwayDiv')

print subChart
</code></pre>

<p>I am using print just to be sure that I am getting all of the data. I see that I am missing some information that I am trying to grab. If I look to the page myself I can see that I am missing a div with the class that shows the subway status.</p>

<p>I am very new to programming so please mind my ignorance</p>

<p>In the subchart variable look for the elements with the class subwayCategory and store the values of the attribute id. 
For ex: from this part of the data</p>

<pre><code>&lt;div style="float: left; width: 220px; border-bottom: 1px solid #7B7B98; padding: 4px 0;"&gt;
&lt;div class="span-11"&gt;&lt;img alt="1 2 3 Subway" class="subwayIcon_123" src="http://www.mta.info/sites/all/modules/custom/servicestatus/images/img_trans.gif"/&gt;&lt;/div&gt;
&lt;div class="subwayCategory" id="123" style="margin-top: 4px;"&gt;&lt;/div&gt;
</code></pre>

<p></p>

<p>The id value of the div with the class subwayCategory is 123.
Now make a request to <code>http://www.mta.info/status/subway/{ID}</code></p>

<p>Replace the term <code>{ID}</code> with the id you want</p>

python html parsing beautifulsoup