fix: create folders recursively
This commit is contained in:
parent
0c6b5ca664
commit
f7437cd82c
4
index.py
4
index.py
@ -31,9 +31,9 @@ for host in sites:
|
||||
images_dir = os.path.join(base_dir, 'images')
|
||||
|
||||
if not os.path.isdir(base_dir):
|
||||
os.mkdir(base_dir)
|
||||
os.mkdirs(base_dir)
|
||||
if not os.path.isdir(images_dir):
|
||||
os.mkdir(images_dir)
|
||||
os.mkdirs(images_dir)
|
||||
|
||||
def scrape(url, depth=0):
|
||||
if args.depth is not None and depth > args.depth: return
|
||||
|
Loading…
Reference in New Issue
Block a user