News for hackers. Stuff that matters.
Re:The Python Standard Library - Where Modules Go To Die by dpritchett on Tuesday May 01, 2012 @11:17AM (#3914722)
Thanks to pip I often don't even bother with the Python stdlib for crusty things like one-off web scrapes or XML parsing. Here's a recent example where I wanted to read some attributes out of some remote XML and did it with requests and PyQuery rather than urllib and xml:

    _domains_text = requests.get(API_URL + "/domainlist.xml").content
    _domains_db = pyquery.PyQuery(_domains_text)
    
    DOMAINS = [d.values()[0] for d in _domains_db('domain')]
Re:The Python Standard Library - Where Modules Go To Die by RegEx on Tuesday May 01, 2012 @07:51PM (#3916875)
I like to set

    jQuery = pyquery.PyQuery(someHTMLDocumentString)
So I can use jQuery like I'm used to. At this point, you can do

    links = jQuery('a')
or whatever.