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
045e10373243c46b202e07abe7dfa6256d82a85935804fde562c3c62f64080212b35619da64717ccfd68429e81f5201bc62b5b584e440ca96c4ab5e6471f35415f;sketchthat |
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
""" | |
HTML <-> text conversions. | |
http://stackoverflow.com/questions/328356/extracting-text-from-html-file-using-python | |
""" | |
from html.parser import HTMLParser | |
from html.entities import name2codepoint | |
import re | |
class _HTMLToText(HTMLParser): | |
def __init__(self): |