Mark Pilgrim’s excellent Universal Feed Parser is a great tool for parsing even ill-formed feeds. Universal Feed Parser is a Python module for downloading and parsing syndicated feeds. It also parses several popular extension modules, including Dublin Core and Apple’s iTunes extensions. To use Universal Feed Parser, you will need Python 2.1 or later. Universal Feed Parser is not meant to run standalone; it is a module for you to use as part of a larger Python program.
With this module you can Parsing a feed from a string, a local file or a remote URL:
Beautiful Soup is an HTML/XML parser for Python that can turn even invalid markup into a parse tree. It provides simple, idiomatic ways of navigating, searching, and modifying the parse tree. This class turns HTML into a tree-like nested tag-soup list of Tag objects and text snippets. A Tag object corresponds to an HTML tag. It knows about the HTML tag’s attributes, and contains a representation of everything contained between the original tag and its closing tag (if any). It’s easy to extract Tags that meet certain criteria.
It commonly saves programmers hours or days of work!
Pygments is a syntax highlighting engine written in Python. That means, it will take source code (or other markup) in a supported language and output a processed version (in different formats) containing syntax highlighting markup.
Here is a small example for highlighting Python code: