Skip to content

Commit

Permalink
调试信息看着头大..优化一下
Browse files Browse the repository at this point in the history
  • Loading branch information
duolabmeng6 committed Mar 29, 2023
1 parent f80f014 commit b0ea242
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyefun/核心易函数支持库/网络请求.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class eRequests(object):
cookies文件路径 = ""
全局HTTP代理 = None
调试信息 = False
调试信息_不显示Cookie = False

默认头信息 = """Accept : */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Content-Type: application/x-www-form-urlencoded"""
Expand Down Expand Up @@ -295,6 +297,10 @@ def _输出调试信息(self, 访问方法, url, 加载cookie, 全局HTTP代理,
代理信息 = "代理 " + 代理信息
状态码 = 返回数据.status_code

if self.调试信息_不显示Cookie:
# cookies = ""
加载cookie = ""

print(
"{访问方法} {url} 状态码 {状态码} 耗时 {耗时}s {代理信息} {重定向地址} {加载cookie} {cookies} {错误信息}".format(访问方法=访问方法, url=url,
状态码=状态码,
Expand Down

0 comments on commit b0ea242

Please sign in to comment.