diff --git a/data.json b/data.json index 4ddaa56..db769c7 100644 --- a/data.json +++ b/data.json @@ -389,7 +389,7 @@ }, "ubuntu_releases": { "out_of_sync_since": null, - "out_of_sync_interval": 86400, + "out_of_sync_interval": 172800, "csc": "", "upstream": "https://launchpad.net/ubuntu/+mirror/mirror.csclub.uwaterloo.ca-release", "file": "" diff --git a/main.py b/main.py index b7c6a4e..d8ab140 100644 --- a/main.py +++ b/main.py @@ -36,7 +36,7 @@ if __name__ == "__main__": if data[project].get('exclude', False): continue checker_result = project_class.check(data, project, current_time) - if project in ["CPAN", "ubuntu", "ubuntu_releases", "manjaro", "mxlinux", "cran", "ctan", "gentooportage"]: + if project in ["CPAN", "ubuntu_releases", "manjaro", "mxlinux", "cran", "ctan", "gentooportage"]: if checker_result: safe_print(f"Success: {project} up-to-date") else: diff --git a/projects/ubuntu.py b/projects/ubuntu.py index 1bfc1bc..00d9ab6 100644 --- a/projects/ubuntu.py +++ b/projects/ubuntu.py @@ -17,9 +17,4 @@ class ubuntu(Project): @staticmethod def check(data, project, current_time): page = requests.get(data[project]["upstream"]).text - indexOfFile = page.find("last verified") - matches = list(datefinder.find_dates(page[indexOfFile:])) - date = matches[0] # date is of type datetime.datetime - return(pd.to_datetime(current_time, unit='s') - date.replace(tzinfo=None) <= pd.to_timedelta(data[project]["out_of_sync_interval"], unit='s')) - - # https://launchpad.net/ubuntu/+mirror/mirror.csclub.uwaterloo.ca-archive \ No newline at end of file + return page.count("Up to date") == 21