mirror-checker/projects/ipfire.py

18 lines
341 B
Python
Raw Normal View History

2021-10-03 15:35:17 -04:00
"""
Contains IPFire class
"""
import requests
2021-10-03 15:44:08 -04:00
from project import Project
2021-10-03 15:35:17 -04:00
2021-10-03 15:44:08 -04:00
class IPFire(Project):
2021-10-03 15:35:17 -04:00
"""IPFire class"""
@staticmethod
2021-10-03 15:44:08 -04:00
def check(data, project):
2021-10-03 15:35:17 -04:00
ipfire_url = "https://mirrors.ipfire.org/mirrors/mirror.csclub.uwaterloo.ca"
ipfire_text = requests.get(ipfire_url).text
return ipfire_text.find("The mirror is up") != -1