调整新闻内容
This commit is contained in:
@@ -113,9 +113,8 @@ class News(object):
|
||||
"""
|
||||
|
||||
API_URL = "http://192.168.2.32:4399/v2/60s"
|
||||
TIMEOUT = 5 # 秒
|
||||
try:
|
||||
resp = requests.get(API_URL, timeout=TIMEOUT)
|
||||
resp = requests.get(API_URL)
|
||||
resp.raise_for_status() # HTTP 非 200 会抛异常
|
||||
|
||||
data = resp.json()
|
||||
|
||||
Reference in New Issue
Block a user