mirror of
				https://github.com/simon987/mobilism_scrape.git
				synced 2025-11-04 12:06:51 +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:
 | 
					# 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()
 | 
					    subprocess.run(["rclone", "copy", "--config", "tmp.conf", filename, "staging:mobilism/"])
 | 
				
			||||||
    if sha1sum in done:
 | 
					    quit(0)
 | 
				
			||||||
        subprocess.run(["rclone", "copy", "--config", "tmp.conf", filename, "staging:mobilism/"])
 | 
					 | 
				
			||||||
        done.add(sha1sum)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def do_premium_download(link, i):
 | 
					def do_premium_download(link, i):
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user