This is as days pass by, by Stuart Langridge

And this is Python CSS parser?, written , and concerning Uncategorized

Has anyone written a Python CSS parser? Specifically, what I want to do is use xml.dom.ext.reader.HtmlLib to get a DOM for an HTML document, and then implement a node.getElementsBySelector() function. I could port Simon's Javascript code to Python, but it doesn't handle pseudo-elements and so on. If someone's written this then I don't have to :) Mark Paschal has something similar, but it doesn't support combinators (like foo > bar) and that's important.

Comments

Dorothea Salo

I picked one off the web awhile back, though I’m not sure it does everything you want it to. Remind me if I don’t email it to you.

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.