nomeyer
4/4/2016 - 1:12 PM

From http://codeblog.dhananjaynene.com/2011/06/10-python-one-liners-to-impress-your-friends/

from xml.dom.minidom import parse, parseString
import urllib2
# note - i convert it back into xml to pretty print it
print parse(urllib2.urlopen("http://search.twitter.com/search.atom?&q=python")).toprettyxml(encoding="utf-8")