Skip to content
Snippets Groups Projects
Commit 38f098b6 authored by Andreas Valder's avatar Andreas Valder
Browse files

pushed wrong commit, fixed now

parent d1f36cb0
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment