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:
parent
1dfd002e53
commit
c481871bde
@ -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']))
|
||||||
|
Loading…
Reference in New Issue
Block a user