From f86ac1b1a3e7b28627e6da72ae2fff684e1b68ca Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Fri, 30 Aug 2024 01:42:27 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E9=85=92=E5=BA=97=E6=BA=90.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/酒店源.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/酒店源.py b/py/酒店源.py index 4985876..b35136d 100644 --- a/py/酒店源.py +++ b/py/酒店源.py @@ -52,7 +52,7 @@ def modify_urls(url): #定义超时时间以及是否返回正确的状态码 def is_url_accessible(url): try: - response = requests.get(url, timeout=3) #////////////////// + response = requests.get(url, timeout=10) #////////////////// #if response.status_code == 200: if 200 <= response.status_code <= 401: return url @@ -115,7 +115,7 @@ for url in urls: try: # 发送GET请求获取JSON文件,设置超时时间为0.5秒 json_url = f"{url}" - response = requests.get(json_url, timeout=3)################################ + response = requests.get(json_url, timeout=10)################################ json_data = response.content.decode('utf-8') try: # 按行分割数据