为什么ctx.log.warn没有输出呢?

来源:4-9 mitmdump详讲。

blowwind

2020-10-11

from mitmproxy import ctx
def request(flow):
    ctx.log.warn(str(flow.request.url))
    ctx.log.warn(str(flow.response.status_code))
    ctx.log.warn(str(flow.request.method))
    print(flow.request.headers)

老师看一下是哪里写错了吗?
最后一行print是有输出的

写回答

1回答

大壮老师

2020-10-11

from mitmproxy import ctx
def request(flow):
	ctx.log.warn(flow.request.url)
	ctx.log.error(flow.request.url)
	ctx.log.info(flow.request.url)

//img.mukewang.com/szimg/5f82c6a609a08e6513420575.jpg

0
0

移动端Python爬虫实战 数据抓取+数据可视化

从App数据抓取到数据可视化,全流程讲解

1794 学习 · 964 问题

查看课程