Hey. Im pretty new to aiohttp/asyncio, and im trying to figure out what the best way to open a website/url with asyncio/aiohttp is. Before that I used selenium, but I’m just wondering what could make it better/faster. Is there anyone that has a good way to do so?
They’ve got a pretty good “Getting started: Client example” in the documentation. Are you looking for something more advanced?
async with aiohttp.ClientSession() as session: async with session.get('https://icanhazip.com/') as response: return response.text().strip()