Created
October 18, 2011 01:05
-
-
Save tunaranch/1294370 to your computer and use it in GitHub Desktop.
BeautifulSoup wrapper than prettifies stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from BeautifulSoup import BeautifulSoup | |
import sys | |
soup = BeautifulSoup(sys.stdin.read()) | |
print soup.prettify() |
#!/usr/bin/python
from bs4 import BeautifulSoup
import sys
soup = BeautifulSoup(sys.stdin.read())
print soup.prettify()
Update for BeautifulSoup4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good work. Just what I needed!