This commit is contained in:
simon987 2020-07-05 17:59:47 -04:00
parent b5c474ea70
commit 672034c690

8
run
View File

@ -27,8 +27,6 @@ def decode_cookiejar(data):
# with open("cookies.txt", "w") as f:
# f.write(encode_cookiejar(cj))
done = set()
secret = json.loads(os.environ["PROJECT_SECRET"])
with open("tmp.conf", "w") as f:
@ -62,10 +60,8 @@ def _download(link, i):
with gzip.open(filename, "wb") as f:
f.write(r.content)
sha1sum = sha1(r.content).hexdigest()
if sha1sum in done:
subprocess.run(["rclone", "copy", "--config", "tmp.conf", filename, "staging:mobilism/"])
done.add(sha1sum)
subprocess.run(["rclone", "copy", "--config", "tmp.conf", filename, "staging:mobilism/"])
quit(0)
def do_premium_download(link, i):