class='something' as kwarg

Vladimir Rusinov vladimir at greenmice.info
Sat Nov 17 09:45:00 CET 2007


Hello!

I'm using beautiful soup html parser, and I need to get all '<div
class=g>...</div>' tags.
It can be done by:

import BeautifulSoup as BSoup

...

soup = BSoup(page)
for div in soup.findAll('div', class='g'):
    <do something>

But how can I use `class` as kwarg name?

-- 
Vladimir Rusinov
GreenMice Solutions: IT-решения на базе Linux
http://greenmice.info/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071117/0ca43bec/attachment.html>


More information about the Python-list mailing list