Created
March 31, 2015 14:50
-
-
Save sitano/16f108e5262c03325e7e to your computer and use it in GitHub Desktop.
HTML Python Prettifier with Beautiful Soup
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
# The current release is Beautiful Soup 4.3.2 (October 2, 2013). | |
# You can install it with pip install beautifulsoup4 or easy_install beautifulsoup4. | |
# It's also available as the python-beautifulsoup4 package in recent versions of Debian, Ubuntu, and Fedora . | |
from bs4 import BeautifulSoup as bs | |
import fileinput | |
import sys | |
for line in fileinput.input(sys.argv[1]): | |
print bs(line).prettify() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment