pyquery

Moving ordered elements and adding arbitrary text in Deliverance

Using the following XPath derived rule, I am able to select a list of events from a Plone site (similar to Plone Community events) and display them in my Deliverance themed site: <replace content="//*[@id='parent-fieldname-title' or @class='explain' or @id='parent-fieldname-location' or @id='parent-fieldname-text']" theme="#center-conte...

how do i make this python code less ugly

First of all python is an awesome language. This is my first project using python and I've made a ridiculous amount of progress already. There's no way that this code below is the best way to do this. What's the most idiomatic way write a class definition? class Course: crn = course = title = tipe = cr_hours = seats = instru...

Iterating over objects in pyquery

I'm scraping a page with Python's pyquery, and I'm kinda confused by the types it returns, and in particular how to iterate over a list of results. If my HTML looks a bit like this: <div class="formwrap">blah blah <h3>Something interesting</h3></div> <div class="formwrap">more rubbish <h3>Something else interesting</h3></div> How do ...