link in project! scratch wont let me put my link here. also: if anybody thinks is a virus, it's not. If you don't trust me, that's fine. don't download it if you don't trust it. (you could also just look at the python code (in notes and credits))
thanks to @TimMCCool bc he made scratchattach, which this uses the code is below: import os import scratchattach as sa import warnings import re warnings.filterwarnings('ignore', category=sa.LoginDataWarning) print("Welcome to The Unofficial Scratch Backup Utility 1.0! \n") usern = input("please input your scratch username: ") passw = input("please input your scratch password: ") session = sa.login(usern, passw) print("\n Welcome, " + session.username + "! \n") user = session.connect_linked_user() savepath = input("what path do you want to save to? ") savepath = os.path.normpath(savepath) os.makedirs(savepath, exist_ok=True) user.update() print("\ndownloading projects... \nthis could take a while") allprojects = user.projects(limit=100000, offset=0) print("downloading " + str(len(allprojects)) + " projects...\n") def getuniquefilename(dirname, filename): base, ext = os.path.splitext(filename) counter = 1 while os.path.exists(os.path.join(dirname, filename)): if counter == 1: filename = f"{base} copy{ext}" else: filename = f"{base} copy {counter}{ext}" counter += 1 return filename for project in allprojects: project_id = project.id fixedfilename = re.sub(r'[^\w\-\.]', '_', project.title) + ".sb3" uniquefilename = getuniquefilename(savepath, fixedfilename) project.download(filename=uniquefilename + ".sb3", dir=savepath) print("downloaded " + project.title + " as " + uniquefilename + ".sb3")