diff --git a/main.py b/main.py index ce3de6d..d15acd0 100644 --- a/main.py +++ b/main.py @@ -171,7 +171,8 @@ def upgrade(): @app.route('/ood/', methods=['GET']) def ood(): - added = [] + updated = [] + unadded = [] url = [] base = [] @@ -204,10 +205,14 @@ def ood(): # query = manga(name=name[z], url=url[z], url_flag=str(base[z]), view_format=0, unknown_value=0) result.url = url[z] new_manga['title'] = name[z] - added.append(new_manga) + updated.append(new_manga) + else: + new_manga = {} + new_manga['title'] = name[z] + unadded.append(new_manga) z = z + 1 db.session.commit() - return jsonify(updated=added) + return jsonify(updated=updated, unadded=unadded) @app.route('/test/', methods=['GET']) def test():