BeautifulSoup, but for CSS?

Posted by MTsoul on Stack Overflow See other posts from Stack Overflow or by MTsoul
Published on 2010-04-26T19:18:41Z Indexed on 2010/04/26 19:23 UTC
Read the original article Hit count: 287

Filed under:
|
|

BeautifulSoup parses HTML and offers various ways to manipulate and search within HTML. Is there something similar for CSS?

Specifically, I'd like to know if a given HTML text is rendered as bold. Either it has an ancestor that is the <strong> or the <bold> tag (which can be done with BeautifulSoup), or it has an ancestor (or itself) that has CSS attributes with font-weight: bold.

Is this possible without resulting to writing my own library?

© Stack Overflow or respective owner

Related posts about python

Related posts about beautifulsoup