From 8341e0a1f3073d3933a9617f128adc9b573bc67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=8A=E6=99=9A=E6=89=93=E8=80=81=E8=99=8E?= Date: Fri, 10 Apr 2026 21:14:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E6=8A=95=E7=A8=BF]=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=84=9A=E6=9C=AC:=20=E7=BD=91=E9=A1=B5=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=94=BF=E7=AD=96=E7=A8=8B=E5=BA=8F=EF=BC=88GET=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=EF=BC=89=20=E2=80=94=20by=20=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=91=98=E5=B0=8Fy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script_library/scripts/basic/get_mnsxghs0.py | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 script_library/scripts/basic/get_mnsxghs0.py diff --git a/script_library/scripts/basic/get_mnsxghs0.py b/script_library/scripts/basic/get_mnsxghs0.py new file mode 100644 index 0000000..c7448e8 --- /dev/null +++ b/script_library/scripts/basic/get_mnsxghs0.py @@ -0,0 +1,40 @@ +import urllib3 +urllib3.disable_warnings() +def menu(): + print('-'*20) + print('网页侦测程序(GET请求)') + print('http状态码含义:') + print('1xx:信息,请求收到,继续处理。') + print('2xx:成功,请求已成功被服务器接收、理解、并接受') + print('3xx:重定向,需要后续操作才能完成这一请求') + print('4xx:客户端错误,请求含有语法错误或者无法被执行') + print('5xx:服务器错误,服务器在处理某个正确请求时发生错误') + print('-'*20) + +def url(): + name_url = input('请输入网名:') + web_url = input('请输入网址:') + + if not web_url.startswith(('http://', 'https://')): + web_url = 'http://' + web_url + + try: + http = urllib3.PoolManager() + r = http.request('GET', web_url, timeout=5.0) + print(name_url, '请求状态码:', r.status) + except Exception as e: + print(f'请求失败: {e}') + +def main(): + menu() + while True: + url() + # 添加退出选项 + choice = input('是否继续检查?(y/n): ').lower() + if choice != 'y': + print('程序结束') + break + +if __name__ == "__main__": + main() + From 0ea70c83aa387ded16aaf3ae13966ef1f7346196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=8A=E6=99=9A=E6=89=93=E8=80=81=E8=99=8E?= Date: Fri, 10 Apr 2026 21:14:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E6=8A=95=E7=A8=BF]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20index.json:=20=E6=B7=BB=E5=8A=A0=20=E7=BD=91=E9=A1=B5?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=94=BF=E7=AD=96=E7=A8=8B=E5=BA=8F=EF=BC=88?= =?UTF-8?q?GET=E8=AF=B7=E6=B1=82=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script_library/index.json | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/script_library/index.json b/script_library/index.json index 36bcf32..a33c664 100644 --- a/script_library/index.json +++ b/script_library/index.json @@ -1,7 +1,7 @@ { "format_version": 1, - "data_version": 86, - "updated": "2026-04-08T22:09:17.767Z", + "data_version": 87, + "updated": "2026-04-10T13:14:17.105Z", "announcement": null, "categories": [ { @@ -1444,6 +1444,29 @@ "updated": null, "status": "active", "lines": 18 + }, + { + "id": "get_mnsxghs0", + "name": "网页状态政策程序(GET请求)", + "name_en": "网页状态政策程序(GET请求)", + "desc": "一个侦测网页状态的Python程序(GET请求),小学生通宵做的,不喜勿喷。如有改进,可在电子邮件内提出意见", + "desc_en": "一个侦测网页状态的Python程序(GET请求),小学生通宵做的,不喜勿喷。如有改进,可在电子邮件内提出意见", + "category": "basic", + "file": "scripts/basic/get_mnsxghs0.py", + "thumbnail": null, + "version": 1, + "file_type": "py", + "author": "程序员小y", + "author_en": "程序员小y", + "tags": [ + "community" + ], + "requires": [], + "min_app_version": "1.5.0", + "added": "2026-04-10", + "updated": null, + "status": "active", + "lines": 41 } ] }