fix: create folders recursively

This commit is contained in:
Mahdi Dibaiee 2017-04-17 14:55:57 +04:30
parent 0c6b5ca664
commit f7437cd82c

View File

@ -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