-
Notifications
You must be signed in to change notification settings - Fork 0
Tracker Health Checks
JackyHe398 on OldHome_main edited this page Aug 1, 2026
·
2 revisions
Check provides simple tracker reachability checks. Use Check.auto() when you want protocol detection from the URL scheme.
from torrentlib.Tracker import Check
print(Check.auto("http://tracker.example.com:8080/announce", timeout=5))
print(Check.auto("udp://tracker.example.com:6969/announce", timeout=5))
print(Check.http("http://tracker.example.com:8080/announce", timeout=5))
print(Check.udp("udp://tracker.example.com:6969/announce", timeout=5))
trackers = [
"http://tracker1.example.com:8080/announce",
"udp://tracker2.example.com:6969/announce",
]
results = Check.multiple(trackers, timeout=5)
for url, is_online in results.items():
print(url, is_online)Check.multiple() also accepts max_threads to limit the number of concurrent checks.