mirror-checker/projects/ubuntu.py

21 lines
470 B
Python
Raw Normal View History

2021-10-03 18:26:43 -04:00
"""
Contains ubuntu class
2021-10-03 18:26:43 -04:00
"""
import os
2021-10-04 01:18:07 -04:00
from project import Project
2021-10-03 18:26:43 -04:00
from shared import CSC_MIRROR
import requests
import datefinder # another date finding library
2021-10-04 01:18:07 -04:00
from datetime import timedelta
from datetime import datetime
import re
import pandas as pd
2021-10-03 18:26:43 -04:00
2021-10-04 01:18:07 -04:00
class ubuntu(Project):
2021-10-03 18:26:43 -04:00
"""ubuntu class"""
@staticmethod
2021-10-04 01:18:07 -04:00
def check(data, project, current_time):
page = requests.get(data[project]["upstream"]).text
return page.count("Up to date") == 21