complete mensa async

This commit is contained in:
2024-04-09 08:50:05 +02:00
parent 490ee7f02f
commit 0d31d84d48
2 changed files with 41 additions and 42 deletions

View File

@ -1,4 +1,3 @@
import requests
import urllib.parse
import time
from bs4 import BeautifulSoup
@ -59,7 +58,7 @@ async def getKurs(token: int, cookie: str):
headers=headers)
html = BeautifulSoup(response.text, 'lxml')
link = html.body.find('a', attrs={'id': "Popup_details0001"})['href']
response = requests.request("GET", url + link[21:], headers=headers, data={})
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
start = content.find(" ") + 4