Update optimize

This commit is contained in:
Andros Fenollosa 2017-04-18 22:51:14 +02:00
parent 7b2c882f66
commit a9cf29a7dd

View File

@ -10,9 +10,10 @@ TYPES = ('jpeg',)
for dirpath, dirnames, files in walk(top_dir): for dirpath, dirnames, files in walk(top_dir):
for name in files: for name in files:
if what(path.join(dirpath, name)) in TYPES:
# Get urls
url = path.join(dirpath, name) url = path.join(dirpath, name)
# Check type
if what(url) in TYPES:
# Get urls
print(url) print(url)
url_out = path.join(top_dir, TEMP_FILE) url_out = path.join(top_dir, TEMP_FILE)
# Remove temp image # Remove temp image