subprocess args should be working correctly now.

This commit is contained in:
2020-03-24 15:58:08 -04:00
parent 9d73de8d04
commit 8a0b81f6a6

View File

@@ -51,17 +51,19 @@ def download():
book={} book={}
if 'http' in each.manga.name or 'https' in each.manga.url: if 'http' in each.manga.name or 'https' in each.manga.url:
# execute = """manga-py """ + each.manga.url + """ -n \"""" + each.manga.name + """\" -d \"""" + PATH + """\" -z -N --print-json""" # execute = """manga-py """ + each.manga.url + """ -n \"""" + each.manga.name + """\" -d \"""" + PATH + """\" -z -N --print-json"""
exec_command = subprocess.Popen(['manga-py', each.manga.url, '-n', each.manga.name, '-d ' + PATH, '-z', '-N', '--print-json'], stdout=subprocess.PIPE) exec_command = subprocess.Popen(['manga-py', each.manga.url, '-n', each.manga.name, '-d', PATH, '-z', '-N', '--print-json'], stdout=subprocess.PIPE)
else: else:
print('nothing') print('nothing')
# execute = """manga-py """ + each.url_metadata.base_url+each.manga.url + """ -n \"""" + each.manga.name.strip('?') + """\" -d \"""" + PATH + """\" -z -N --print-json""" # execute = """manga-py """ + each.url_metadata.base_url+each.manga.url + """ -n \"""" + each.manga.name.strip('?') + """\" -d \"""" + PATH + """\" -z -N --print-json"""
exec_command = subprocess.Popen(['manga-py', each.url_metadata.base_url, each.manga.url, '-n', each.manga.name.strip('?'), '-d ' + PATH, '-z', '-N', '--print-json'], stdout=subprocess.PIPE) exec_command = subprocess.Popen(['manga-py', each.url_metadata.base_url+each.manga.url, '-n', each.manga.name.strip('?'), '-d', PATH, '-z', '-N', '--print-json'], stdout=subprocess.PIPE)
book['title'] = each.manga.name book['title'] = each.manga.name
# book['command'] = 'nothing' # book['command'] = 'nothing'
# os.system(execute) # os.system(execute)
# exec_command = subprocess.Popen(execute, stdout=subprocess.PIPE) # exec_command = subprocess.Popen(execute, stdout=subprocess.PIPE)
book['output'] = exec_command.communicate() book['output'] = exec_command.communicate()
print(exec_command.args)
updated.append(book) updated.append(book)
missing = check(passin=1) missing = check(passin=1)