From 5f82a1c1a786bf74a41aaecb123f8a7d063e76f2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 8 Jul 2019 14:14:27 -0300 Subject: Log: download start/finish messages --- grab-queue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'grab-queue') diff --git a/grab-queue b/grab-queue index 54bad32..e50a688 100755 --- a/grab-queue +++ b/grab-queue @@ -78,7 +78,7 @@ class DownloadMultiple: self.ensuredir(folder) with open(logdir + 'grab-queue.log', "a") as log: - log.write('Downloading ' + url + '...') + log.write('Downloading started: ' + url + "\n") # Set opts # Other opts: -q --show-progress -O @@ -118,6 +118,9 @@ class DownloadMultiple: output.write(str(datetime.datetime.now()) + '\n') output.close() + with open(logdir + 'grab-queue.log', "a") as log: + log.write('Downloading finished: ' + url + "\n") + if os.path.isfile(local_filename): # File might be too big, so we're not computing it's inside the script #content = open(local_filename, 'rb') -- cgit v1.2.3