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