From 38f098b64d548be7b0425a0b781a03bb147c5bbe Mon Sep 17 00:00:00 2001 From: Andreas <andreasv@fsmpi.rwth-aachen.de> Date: Sun, 16 Oct 2016 00:20:15 +0200 Subject: [PATCH] pushed wrong commit, fixed now --- importer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/importer.py b/importer.py index 117bb1a..e7d599e 100644 --- a/importer.py +++ b/importer.py @@ -2,7 +2,7 @@ from server import * @app.route('/import/<int:id>', methods=['GET', 'POST']) @mod_required -def import_from(source=None, id=None): +def import_from(id): courses = query('SELECT * FROM courses WHERE id = ?', id)[0] lectures = query('SELECT * FROM lectures WHERE course_id = ?', courses['id']) @@ -35,7 +35,7 @@ def import_from(source=None, id=None): try: remote_html = urllib.request.urlopen(i['url']).read() except: - flash("Ungültige URL: '"+i['url']"'") + flash("Ungültige URL: '"+i['url']+"'") tablexpath = "//td[text()='Termine und Ort']/following::table[1]" basetable = html.fromstring(remote_html).xpath(tablexpath)[0] parsebase = html.tostring(basetable); -- GitLab