mirror of
https://github.com/simon987/mobilism_scrape.git
synced 2025-04-19 18:46:46 +00:00
rcl
This commit is contained in:
parent
b5c474ea70
commit
672034c690
6
run
6
run
@ -27,8 +27,6 @@ def decode_cookiejar(data):
|
|||||||
# with open("cookies.txt", "w") as f:
|
# with open("cookies.txt", "w") as f:
|
||||||
# f.write(encode_cookiejar(cj))
|
# f.write(encode_cookiejar(cj))
|
||||||
|
|
||||||
done = set()
|
|
||||||
|
|
||||||
secret = json.loads(os.environ["PROJECT_SECRET"])
|
secret = json.loads(os.environ["PROJECT_SECRET"])
|
||||||
|
|
||||||
with open("tmp.conf", "w") as f:
|
with open("tmp.conf", "w") as f:
|
||||||
@ -62,10 +60,8 @@ def _download(link, i):
|
|||||||
with gzip.open(filename, "wb") as f:
|
with gzip.open(filename, "wb") as f:
|
||||||
f.write(r.content)
|
f.write(r.content)
|
||||||
|
|
||||||
sha1sum = sha1(r.content).hexdigest()
|
|
||||||
if sha1sum in done:
|
|
||||||
subprocess.run(["rclone", "copy", "--config", "tmp.conf", filename, "staging:mobilism/"])
|
subprocess.run(["rclone", "copy", "--config", "tmp.conf", filename, "staging:mobilism/"])
|
||||||
done.add(sha1sum)
|
quit(0)
|
||||||
|
|
||||||
|
|
||||||
def do_premium_download(link, i):
|
def do_premium_download(link, i):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user