Update 'root/app/fanficdownload.py'

This commit is contained in:
sam 2023-06-06 20:02:51 +00:00
parent a39f5d01cb
commit 419151cc51

View File

@ -1,6 +1,6 @@
from fanficfare import geturls from fanficfare import geturls
from os import listdir, remove, rename, utime, devnull from os import listdir, remove, rename, utime, devnull, makedirs
from os.path import isfile, join from os.path import isfile, join, exists
from subprocess import check_output, STDOUT, call, PIPE from subprocess import check_output, STDOUT, call, PIPE
import logging import logging
from optparse import OptionParser from optparse import OptionParser
@ -125,6 +125,9 @@ def check_regexes(output):
def downloader(args): def downloader(args):
url, inout_file, path, live = args url, inout_file, path, live = args
# loc = mkdtemp() # loc = mkdtemp()
# loc = '/config/downloads'
if not exists('/config/downloads'):
makedirs('/config/downloads')
loc = '/config/downloads' loc = '/config/downloads'
output = "" output = ""
output += log("Working with url {}".format(url), 'HEADER', live) output += log("Working with url {}".format(url), 'HEADER', live)