diff options
| -rw-r--r-- | mitmproxy/contentviews/__init__.py | 3 | ||||
| -rw-r--r-- | mitmproxy/contentviews/html_outline.py | 17 | ||||
| -rw-r--r-- | setup.py | 1 | ||||
| -rw-r--r-- | test/mitmproxy/contentviews/test_html_outline.py | 9 | 
4 files changed, 1 insertions, 29 deletions
diff --git a/mitmproxy/contentviews/__init__.py b/mitmproxy/contentviews/__init__.py index a1866851..f696f669 100644 --- a/mitmproxy/contentviews/__init__.py +++ b/mitmproxy/contentviews/__init__.py @@ -22,7 +22,7 @@ from mitmproxy import exceptions  from mitmproxy.net import http  from mitmproxy.utils import strutils  from . import ( -    auto, raw, hex, json, xml_html, html_outline, wbxml, javascript, css, +    auto, raw, hex, json, xml_html, wbxml, javascript, css,      urlencoded, multipart, image, query, protobuf  )  from .base import View, VIEW_CUTOFF, KEY_MAX, format_text, format_dict, TViewResult @@ -168,7 +168,6 @@ add(hex.ViewHex())  add(json.ViewJSON())  add(xml_html.ViewXmlHtml())  add(wbxml.ViewWBXML()) -add(html_outline.ViewHTMLOutline())  add(javascript.ViewJavaScript())  add(css.ViewCSS())  add(urlencoded.ViewURLEncoded()) diff --git a/mitmproxy/contentviews/html_outline.py b/mitmproxy/contentviews/html_outline.py deleted file mode 100644 index d6c51b29..00000000 --- a/mitmproxy/contentviews/html_outline.py +++ /dev/null @@ -1,17 +0,0 @@ -import html2text - -from mitmproxy.contentviews import base - - -class ViewHTMLOutline(base.View): -    name = "HTML Outline" -    prompt = ("html outline", "o") -    content_types = ["text/html"] - -    def __call__(self, data, **metadata): -        data = data.decode("utf-8", "replace") -        h = html2text.HTML2Text(baseurl="") -        h.ignore_images = True -        h.body_width = 0 -        outline = h.handle(data) -        return "HTML Outline", base.format_text(outline) @@ -66,7 +66,6 @@ setup(          "click>=6.2, <7",          "cryptography>=2.0,<2.1",          "h2>=3.0, <4", -        "html2text>=2016.1.8, <=2016.9.19",          "hyperframe>=5.0, <6",          "kaitaistruct>=0.7, <0.8",          "ldap3>=2.2.0, <2.4", diff --git a/test/mitmproxy/contentviews/test_html_outline.py b/test/mitmproxy/contentviews/test_html_outline.py deleted file mode 100644 index 9e664e52..00000000 --- a/test/mitmproxy/contentviews/test_html_outline.py +++ /dev/null @@ -1,9 +0,0 @@ -from mitmproxy.contentviews import html_outline -from test.mitmproxy.contentviews import full_eval - - -def test_view_html_outline(): -    v = full_eval(html_outline.ViewHTMLOutline()) -    s = b"<html><br><br></br><p>one</p></html>" -    assert v(s) -    assert v(b'\xfe')  | 
