Whitebox Tests
This commit is contained in:
@ -57,7 +57,10 @@ async def getKurs(token: int, cookie: str):
|
||||
response = await s.get(url=f"{url}?APPNAME=CampusNet&PRGNAME=COURSERESULTS&ARGUMENTS=-N{token},-N000307,",
|
||||
headers=headers)
|
||||
html = BeautifulSoup(response.text, 'lxml')
|
||||
link = html.body.find('a', attrs={'id': "Popup_details0001"})['href']
|
||||
try:
|
||||
link = html.body.find('a', attrs={'id': "Popup_details0001"})['href']
|
||||
except TypeError:
|
||||
return 0
|
||||
response = await s.get(url=f"{url}{link[21:]}", headers=headers)
|
||||
html = BeautifulSoup(response.text, 'lxml')
|
||||
content = html.body.find('td', attrs={'class': 'level02'}).text
|
||||
|
||||
Reference in New Issue
Block a user