mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 03:08:29 +02:00
added a check if file is already downloaded
This commit is contained in:
parent
45c2dd7d04
commit
86d718d501
1 changed files with 4 additions and 0 deletions
|
@ -1,10 +1,14 @@
|
|||
import requests
|
||||
import os
|
||||
|
||||
root = "https://raw.githubusercontent.com/Faraphel/MKWF-Install/master/"
|
||||
|
||||
|
||||
def get_github_file(self, file):
|
||||
try:
|
||||
if os.path.exists(file): return 1
|
||||
dl = requests.get(root+file, allow_redirects=True, stream=True)
|
||||
|
||||
if dl.status_code == 200: # if page is found
|
||||
with open(file, "wb") as file:
|
||||
chunk_size = 4096
|
||||
|
|
Loading…
Reference in a new issue