diff --git a/key.py b/key.py index bcb0089..2afd278 100644 --- a/key.py +++ b/key.py @@ -21,8 +21,7 @@ class App: await self.send_message("hi there, i'm marvin") async def send_message(self, message: str): - print(message) - resp = await self.client.room_send( + await self.client.room_send( room_id=self.room_id, message_type="m.room.message", content={ @@ -30,7 +29,6 @@ class App: "body": message, }, ) - print(resp) async def run(self): await self.setup() @@ -41,13 +39,12 @@ class App: async def update(self): text = "" async with aiohttp.ClientSession() as session: - url = ( + async with session.get( "https://fundsuche02.kivbf.de//MyApp.asp" "?wci=FundHeader&Mdt=Bamberg&format=&PLZ=96047" "&KM=50&KATEGORIE=%7B705DA1A1-2E03-4B2A-A31D-4E78E713CD79%7D" "&DATUM=01.09.2020&BESCHREIBUNG=&FILTER=A&MerkmaleData=" - ) - async with session.get(url) as resp: + ) as resp: text = await resp.text() soup = bs4.BeautifulSoup(text, "html.parser") elements = soup.find_all(