1
0
mirror of https://git.lurk.org/repos/radio-looptober.git synced 2024-12-27 14:01:56 +01:00

simplify directory creation

Signed-off-by: ugrnm <ultrageranium@bleu255.com>
This commit is contained in:
Claude Heiland-Allen 2023-06-15 07:46:51 +01:00 committed by ugrnm
parent 1dfd002e53
commit c481871bde

View File

@ -101,13 +101,9 @@ for collection in data:
i["account"]["username"], i["account"]["username"],
len(i["media_attachments"]))) len(i["media_attachments"])))
if not os.path.exists(output_dir):
os.mkdir(output_dir)
for l in looooops: for l in looooops:
path = os.path.join(output_dir,"{}_{}".format(l['creator'], l['id'])) path = os.path.join(output_dir,"{}_{}".format(l['creator'], l['id']))
if not os.path.exists(path): os.makedirs(path, exist_ok=True)
os.mkdir(path)
print("\n") print("\n")
print("Downloading looops by ***{}***".format(l['creator'])) print("Downloading looops by ***{}***".format(l['creator']))