diff options
-rw-r--r-- | yt.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -20,7 +20,7 @@ import math, requests, random, time, traceback -# Default values so that the command at least does something if the API is down +# Default values so that the command still works if api.invidious.io is down cache_expiry = -math.inf instances = ['yewtu.be'] api_instances = ['i.psf.lt'] @@ -29,7 +29,7 @@ api_instances = ['i.psf.lt'] def fetch_instances(irc, args): global cache_expiry, instances, api_instances - # Refresh the cache at most once per week + # Refresh the cache at most once per day if time.monotonic() >= cache_expiry or not instances or not api_instances: try: resp = requests.get('https://api.invidious.io/instances.json') |