Created
April 11, 2016 11:14
-
-
Save s10018/26a2654ad6917e464045aa4c4602e5a5 to your computer and use it in GitHub Desktop.
もうこれでいいよね
This file contains hidden or 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 | |
| import sys | |
| import argparse | |
| import bs4 | |
| def main(args): | |
| print(bs4.BeautifulSoup(args.input_file.read()).prettify().encode('utf-8')) | |
| def get_parser(): | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('input_file', type=argparse.Filetype("r")) | |
| return parser | |
| if __name__ == '__main__': | |
| main(get_parser().parse_args()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment