import asyncio

import aiohttp


async def http_get(range_max):
    data = []
    async with aiohttp.ClientSession() as session:
        for comment_id in range(1, range_max):
            url = f"https://jsonplaceholder.typicode.com/comments/{comment_id}"
            async with session.get(url) as resp:
                payload = await resp.json()
                data.append(payload)
    for payload in data:
        result = f"{__name__}: {payload}"
        print(result)


def get_responses_async(range_max=500):
    asyncio.run(http_get(range_max))
