From d999efb7cf0222d24145a8c76f8b562662ab9f0d Mon Sep 17 00:00:00 2001 From: 2509165004 <2509165004@student.edu.cn> Date: Sun, 15 Mar 2026 15:03:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BD=9C=E4=B8=9A=E4=B8=80?= =?UTF-8?q?=EF=BC=9A=E7=88=AC=E8=99=AB=E5=9F=BA=E7=A1=80=E5=85=A5=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lxj.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 lxj.py diff --git a/lxj.py b/lxj.py new file mode 100644 index 0000000..12c2dad --- /dev/null +++ b/lxj.py @@ -0,0 +1,8 @@ +import requests +url = 'http://example.com' +params = {'key':'value'} +response = requests.get(url, params=params) +if response.status_code == 200: + print("请求成功,获取到HTML内容") +else: + print(f"请求失败,状态码:{response.status_code}") \ No newline at end of file