The problem is When running the code it doesn't finish
it just print the index and stops at the end
What I am doing wrong?
limits = httpx.Limits(max_keepalive_connections=5, max_connections=10)
finalList=[]
async def getVouchDetails(link, client):
##getting params from link
response = await client.get('https://egramswaraj.gov.in/paymentVoucherDetail.do',
params=params, headers=headers,)
soup = BeautifulSoup(response.content, 'lxml')
return soup
async def poolVouch(link, client):
print(links.index(link))
soup = await getVouchDetails(link,client)
### extract data from soup
finalList.append([##add required data])
async def main(links):
async with httpx.AsyncClient(limits=limits) as client:
tasks = []
for link in links:
tasks.append(asyncio.ensure_future(poolVouch(link, client)))
await asyncio.gather(*tasks)
##Links contains 100k links
asyncio.run(main(links))
Does it still running I have to wait or something else