Hi everyone,<br><br>I am using urllib to scrape an HTML page, and creating an instance of BeautifulSoup as follows:<br><b style="background-color: rgb(255, 255, 255);"><br></b><font style="background-color: rgb(255, 255, 255); font-family: comic sans ms,sans-serif;" size="2">from BeautifulSoup import BeautifulSoup<br>
import re, urllib<br><br>doc = urllib.urlopen(&quot;<a href="http://weather.za.msn.com/local.aspx?wealocations=wc:SFXX0010&amp;q=Cape+Town%2c+Western+Cape">http://weather.za.msn.com/local.aspx?wealocations=wc:SFXX0010&amp;q=Cape+Town%2c+Western+Cape</a>&quot;).read()<br>
soup = BeautifulSoup(&#39;&#39;.join(doc))<br><br>#print soup.prettify()<br>weather_row = soup.findAll(&#39;tr&#39;, class=&quot;rs1&quot;)<br>print weather_row</font><br><br clear="all">The call to <font style="background-color: rgb(255, 255, 255); font-family: comic sans ms,sans-serif;" size="2">soup.findAll</font><font size="2"> </font>is failing because &quot;class&quot; is a reserved keyword in Python. Using BeautifulSoup, how can I find a specific table row whose only identifying attribute is its CSS class?<br>
<br>Thanks.<br><br>-- <br>Regards,<br>Sithembewena Lloyd Dube<br><a href="http://www.lloyddube.com">http://www.lloyddube.com</a><br>