mirror-checker/shared.py

11 lines
282 B
Python
Raw Normal View History

2021-08-24 17:00:51 -04:00
"""Contains shared constants and functions"""
import requests
CSC_MIRROR = "http://mirror.csclub.uwaterloo.ca/"
def get_sec(timestamp_file_url):
"""Get seconds since the Epoch from timestamp file"""
sec_str = requests.get(timestamp_file_url).text
return int(sec_str)