mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-28 23:41:26 +08:00
Make pretty-printing more robust.
Also, since BeautifulSoup is so damn slow, print a statusbar message saying that we're calculating a pretty version of the response. Maybe I should add hangman or something, becuase on a 200k document this can take ages.
This commit is contained in:
@@ -47,8 +47,9 @@ def prettybody(s):
|
||||
Return a list of pretty-printed lines.
|
||||
"""
|
||||
s = BeautifulSoup.BeautifulStoneSoup(s)
|
||||
s = s.prettify()
|
||||
return s.split("\n")
|
||||
s = s.prettify().strip()
|
||||
parts = s.split("\n")
|
||||
return [repr(i)[1:-1] for i in parts]
|
||||
|
||||
|
||||
def hexdump(s):
|
||||
|
||||
Reference in New Issue
Block a user