Updated to PyQuery because BeautifulSoup wouldn't work like I want it.