gene tani wrote: > [EMAIL PROTECTED] wrote: > > if i have a piece of html that looks like this > > > > <tr class="rulesbody"> > > <td width="183" class="rulesbody">cnn.com > > > > and i want to scrape out cnn.com , what syntax would i use? i have > > tried this and it doesn't work > > > > for incident in bs('td', {'class' : 'rulesbody'}, {'class' : > > 'rulesbody'} ): > > Did you try Beautiful soup, as suggested in the reply you got the 1st > time you posted this question?
sorry, nevermind, you did put forth some effort myhtml=r'<tr class="rulesbody"> <td width="183" class="rulesbody">cnn.com </td>' soup = BeautifulSoup(myhtml) print soup.td.string -- http://mail.python.org/mailman/listinfo/python-list