Hello! i am not a big coder and i am breaking my head trying to make a simple task... i just want to use the following code
import asyncio
import aiohttp
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('http://httpbin.org/get') as resp:
print(resp.status)
asyncio.run(main())
but i want to implement the following and i don't know how to do it.. please help. My idea is the following:
with open("urls.txt", "r") as urlFiles:
lines = urlFiles.read().splitlines()
and the somehow replace the session.get('https://...') with session.get('linesOfUrls.txt')
the urls.txt is something like:
etc