mirror of
https://github.com/simon987/mobilism_scrape.git
synced 2025-04-10 14:26:44 +00:00
rcl
This commit is contained in:
parent
b5c474ea70
commit
672034c690
8
run
8
run
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user