mirror of
https://github.com/abc1763613206/myiptv.git
synced 2025-12-17 23:34:35 +08:00
fix: 使用 HEAD 请求以规避 GET 测试时下个没完的情况
This commit is contained in:
2
main.py
2
main.py
@@ -51,7 +51,7 @@ def check_channel(clist, num):
|
|||||||
with httpx.Client(timeout=0.5) as client:
|
with httpx.Client(timeout=0.5) as client:
|
||||||
ReqStatus = False
|
ReqStatus = False
|
||||||
try:
|
try:
|
||||||
r = client.get(clist[3], follow_redirects=True)
|
r = client.head(clist[3], follow_redirects=True)
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
ReqStatus = True
|
ReqStatus = True
|
||||||
except httpx.UnsupportedProtocol:
|
except httpx.UnsupportedProtocol:
|
||||||
|
|||||||
Reference in New Issue
Block a user