more work on output parsing
This commit is contained in:
7
main.py
7
main.py
@@ -45,7 +45,7 @@ def index():
|
||||
@app.route('/download', methods=['GET'])
|
||||
def download():
|
||||
updated = []
|
||||
|
||||
notupdated = []
|
||||
result = db.session.query(manga, url_metadata).filter_by(active=1).join(url_metadata, manga.url_flag==url_metadata.flag).all()
|
||||
|
||||
for each in result:
|
||||
@@ -66,11 +66,12 @@ def download():
|
||||
stdout = exec_command.communicate()[0]
|
||||
# print(stdout)
|
||||
book['command'] = exec_command.args
|
||||
|
||||
if stdout in 'No new chapters found':
|
||||
notupdated.append(book['title'] + 'not updated')
|
||||
updated.append(book)
|
||||
|
||||
missing = check(passin=1)
|
||||
return jsonify(manga=updated, missingFlags=missing[0], missingManga=missing[1], test=stdout)
|
||||
return jsonify(manga=updated, missingFlags=missing[0], missingManga=missing[1], notupdated=notupdated)
|
||||
|
||||
@app.route('/upload', methods=['GET'])
|
||||
def upload_jason():
|
||||
|
||||
Reference in New Issue
Block a user