You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tempdetails=re.findall('<table class="tb"[\s\S]*</table>', response.text)[0] # extract first table from html body, as it contains the prüfungen
89
+
while'<td class="level02"'intempdetails:
90
+
currentrow=list()
91
+
currentrow.append(module[0])
92
+
currentrow.append(module[1])
93
+
tempdetails=tempdetails.split('<td class="level02"', 1)[1].split('>', 1)[1].split('</td',1) #remove everything before "level2"-heading. and split left of td end and right. left goes into table, right will be further edited.
tempdetails=tempdetails.split('<tr>', 1)[1].split('</tr>',1) #cut off before next <tr> and split at /tr. [0] is not prüfungstable, [1] is for the next loop
98
+
forcellinre.findall('<td .*>[\s\S]*</td>', tempdetails[0]): #loops over all td elements #TODO this only returns one giant match instead of a list of multiple matches???
99
+
currentrow.append(tempdetails[0].split('>', 1)[1].split('<')[0]) #get content between html tags
100
+
#currentrow = currentrow[] #last two are extern anerkannt and empty, so they get cut off
101
+
102
+
detailview.append(currentrow)
103
+
tempdetails=tempdetails[1] #ready for the next loop
0 commit comments