Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"URLS",
"NAMES",
"SIZE",
]
)
# Columns = [DATE,URL,NAME,SIZE,LANG,CONTENT')]
# with open("logs/process.csv", "a") as log:
# log.write('DATE,URL,NAME,SIZE,LANG,CONTENT\n')
for i in range(0, len(logs)):
date = str(logs['DATE'][i].strip())
url = str(logs['URL'][i].strip())
name = str(logs['NAME'][i].strip())
size = str(logs['SIZE'][i])
try:
output = Tikify(dataPath + name)
content = unicode(output.content)
title = str(output.title)
lang = str(output.lang)
with open("../logs/process2.csv", "a") as log:
log.write(('%s\t%s\t%s\t%s\t%s\t%s\t%s\n') % (date, url, name, size, lang, title, content))
print ('Appended line %d...') % i
except Exception:
continue