Commit 13b1965a authored by dario's avatar dario
Browse files

make univis urls https

parent cbf12d40
......@@ -15,13 +15,13 @@ def univis_escape(name):
def generate_univis_link(metadata):
escapedlecture = univis_escape(metadata['lecture'])
semester = "20%02d%s" % metadata['semester']
return "http://univis.uni-erlangen.de/prg?search=lectures&name=%s&sem=%s&show=long" % (escapedlecture, semester)
return "https://univis.uni-erlangen.de/prg?search=lectures&name=%s&sem=%s&show=long" % (escapedlecture, semester)
def get_univis_metadata(metadata):
try:
escapedlecture = univis_escape(metadata['lecture'])
semester = "20%02d%s" % metadata['semester']
univislink = 'http://univis.uni-erlangen.de/prg?search=lectures&name=%s&sem=%s&show=xml' % (escapedlecture, semester)
univislink = 'https://univis.uni-erlangen.de/prg?search=lectures&name=%s&sem=%s&show=xml' % (escapedlecture, semester)
xmlfile = urllib2.urlopen(univislink)
xmltree = xml.etree.ElementTree.fromstring(xmlfile.read())
metadata['shortname'] = xmltree.find('Lecture/short').text
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment