From 55e88ad86868423ba4ca4dafb7b657d58b069bdd Mon Sep 17 00:00:00 2001 From: iam-py-test <84232764+iam-py-test@users.noreply.github.com> Date: Mon, 8 Nov 2021 07:41:10 -0500 Subject: [PATCH] Update compile.py --- ClearURLs for uBo/compile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ClearURLs for uBo/compile.py b/ClearURLs for uBo/compile.py index 89639c879..707089525 100644 --- a/ClearURLs for uBo/compile.py +++ b/ClearURLs for uBo/compile.py @@ -23,6 +23,7 @@ import json import sys +import hashlib from datetime import date from typing import IO @@ -135,6 +136,12 @@ def getrules() -> str: RULES = "https://raw.githubusercontent.com/ClearURLs/Rules/master/data.min.json" return requests.get(RULES).text +def haschanged() -> bool: + try: + hashes = json.loads(open("hash.txt").read() + except: + hashes = [] + toph = hashlib.sha256("") def main() -> int: data_min_json = json.loads(getrules())