I want to make a data scraping python program that gets from the user an input (the zipcode) and prints the Total population, Housing units, Land area, Density, and Water area for this site:http://www.uszip.com/zip/ . I am using regular expressions, but I got stuck with some html tags. I need the data contained each time, for example 10.13:
Land area<br><span class="stype">(sq. miles)</span></dt><dd>10.13</dd><dt>
Density<br><span class="stype">(people per sq. mile)</span></dt><dd>2,146.20<span class="trend trend-up" title="+34 (+1.59% since 2000)">▲</span></dd><dt>
Water area<br><span class="stype">(sq. miles)</span></dt><dd>0.06</dd>
I am thinking something like this:
Land area<br><span class="stype">(sq. miles)</span></dt><dd>(.*?)</dd><dt>
Any ideas or other ways to implement this?