diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-07-06 17:31:08 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-07-06 17:31:08 -0700 |
commit | 444f0a4c397e3d664ce80f65d176d871b8e1194e (patch) | |
tree | f3013e551579c6513636856168f9747237702647 /examples/custom_contentviews.py | |
parent | 811b72cd304a8c75efaf706fd57cfbe9494cd3d9 (diff) | |
download | mitmproxy-444f0a4c397e3d664ce80f65d176d871b8e1194e.tar.gz mitmproxy-444f0a4c397e3d664ce80f65d176d871b8e1194e.tar.bz2 mitmproxy-444f0a4c397e3d664ce80f65d176d871b8e1194e.zip |
py3++
Diffstat (limited to 'examples/custom_contentviews.py')
-rw-r--r-- | examples/custom_contentviews.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/custom_contentviews.py b/examples/custom_contentviews.py index 05ebeb69..92fb6a58 100644 --- a/examples/custom_contentviews.py +++ b/examples/custom_contentviews.py @@ -11,7 +11,7 @@ class ViewPigLatin(contentviews.View): content_types = ["text/html"] def __call__(self, data, **metadata): - if strutils.isXML(data): + if strutils.is_xml(data): parser = lxml.etree.HTMLParser( strip_cdata=True, remove_blank_text=True @@ -20,7 +20,7 @@ class ViewPigLatin(contentviews.View): docinfo = d.getroottree().docinfo def piglify(src): - words = string.split(src) + words = src.split() ret = '' for word in words: idx = -1 |