aboutsummaryrefslogtreecommitdiffstats
path: root/examples/custom_contentviews.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-02 13:03:37 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-02 13:04:19 +1200
commit09da1febbd9beac5ef5650274899439f5ce10e98 (patch)
tree76ba04357353645f49e0f4bd8d835e471239b54b /examples/custom_contentviews.py
parent31012d782f64727de1d86662139e9ec6618043c5 (diff)
downloadmitmproxy-09da1febbd9beac5ef5650274899439f5ce10e98.tar.gz
mitmproxy-09da1febbd9beac5ef5650274899439f5ce10e98.tar.bz2
mitmproxy-09da1febbd9beac5ef5650274899439f5ce10e98.zip
Shift a bunch more string-related functions to strutils
Diffstat (limited to 'examples/custom_contentviews.py')
-rw-r--r--examples/custom_contentviews.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/custom_contentviews.py b/examples/custom_contentviews.py
index 6cc9314c..034f356c 100644
--- a/examples/custom_contentviews.py
+++ b/examples/custom_contentviews.py
@@ -1,7 +1,8 @@
import string
import lxml.html
import lxml.etree
-from mitmproxy import utils, contentviews
+from mitmproxy import contentviews
+from netlib import strutils
class ViewPigLatin(contentviews.View):
@@ -10,7 +11,7 @@ class ViewPigLatin(contentviews.View):
content_types = ["text/html"]
def __call__(self, data, **metadata):
- if utils.isXML(data):
+ if strutils.isXML(data):
parser = lxml.etree.HTMLParser(
strip_cdata=True,
remove_blank_text=True