feat: 给请求自动添加 Referer

This commit is contained in:
AdminWhaleFall
2022-04-26 21:53:55 +08:00
parent 9b08847697
commit 9b226ebfbb
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -11,6 +11,7 @@ def test_resq(api: API, phone) -> httpx.Response:
:return: httpx 请求对象.
"""
api = api.handle_API(phone)
default_header['Referer'] = api.url
with httpx.Client(headers=default_header, timeout=8) as client:
if not isinstance(api.data, dict):
print("data")